|
 |
asp_web_howto thread: email responses
Message #1 by "John P. Miller" <jpmiller@a...> on Thu, 23 Aug 2001 08:28:57 -0400
|
|
I have a database setup to allow users to submit computer repair
requests to my office. The data from the requests are inserted into my
database. The technicians then, after completing the repairs, complete a
work order form, storing other data into the database for billing. On
the original repair request, users can list an email address; what I
would like to be able to do is: When a technician submits the final work
order, run a routine to send an email to the email address from the
original request with all of the data that is being submitted in the SQL
statement to the database. How do I generate an email and insert session
variables into it?
Thanks in advance,
John Miller
Message #2 by "Alex Shiell, ITS, EC, SE" <alex.shiell@s...> on Thu, 23 Aug 2001 15:37:13 +0100
|
|
use CDONTS
Set oMail = Server.CreateObject("CDONTS.Newmail")
With oMail
.To = sRecip
.From = sFrom
.Subject = sSubject
.Body = sMessage
.send
End With
Set oMail = Nothing
Obviously the strings can contain whatever you want, session variables
etc...
-----Original Message-----
From: John P. Miller [mailto:jpmiller@a...]
Sent: 23 August 2001 13:29
To: ASP Web HowTo
Subject: [asp_web_howto] email responses
I have a database setup to allow users to submit computer repair
requests to my office. The data from the requests are inserted into my
database. The technicians then, after completing the repairs, complete a
work order form, storing other data into the database for billing. On
the original repair request, users can list an email address; what I
would like to be able to do is: When a technician submits the final work
order, run a routine to send an email to the email address from the
original request with all of the data that is being submitted in the SQL
statement to the database. How do I generate an email and insert session
variables into it?
Thanks in advance,
John Miller
Message #3 by "Tim Morford" <tmorford@n...> on Thu, 23 Aug 2001 10:43:54 -0400
|
|
Use CDONTS, What I would do is have on the Page that the techs but in the
final info, have a function that uses CDONTS and a quick SQL string if need
be, and dump an email. If you need more info let me know, I will be happy to
help
here is a code snippit to get you started
Set objMail2 = server.CreateObject("CDONTS.NewMail")
objMail2.from = youremail@w...
objMail2.Subject = "Work Completed " & Now() & "."
objMail2.To = objRS("email")
objMail2.Body = objRS("work_desc")
objMail2.BodyFormat = 0
objMail2.MailFormat = 0
objMail2.Send
Set objMail2 = Nothing
Tim Morford
-----Original Message-----
From: John P. Miller [mailto:jpmiller@a...]
Sent: Thursday, August 23, 2001 8:29 AM
To: ASP Web HowTo
Subject: [asp_web_howto] email responses
I have a database setup to allow users to submit computer repair
requests to my office. The data from the requests are inserted into my
database. The technicians then, after completing the repairs, complete a
work order form, storing other data into the database for billing. On
the original repair request, users can list an email address; what I
would like to be able to do is: When a technician submits the final work
order, run a routine to send an email to the email address from the
original request with all of the data that is being submitted in the SQL
statement to the database. How do I generate an email and insert session
variables into it?
Thanks in advance,
John Miller
Message #4 by "Tim Morford" <tmorford@n...> on Thu, 23 Aug 2001 11:27:47 -0400
|
|
well to start you can do an If Session("email") <> "" then
body = session("name")" your work is completed."
body = body & "the details are as followed, " session("details")
Set objMail2 = server.CreateObject("CDONTS.NewMail")
objMail2.from = youremail@w...
objMail2.Subject = "Work Completed " & Now() & "."
objMail2.To = session("email")
objMail2.Body = body
objMail2.BodyFormat = 0
objMail2.MailFormat = 0
objMail2.Send
Set objMail2 = Nothing
end if
then run your Sql
Tim Morford
-----Original Message-----
From: John P. Miller [mailto:jpmiller@a...]
Sent: Thursday, August 23, 2001 8:29 AM
To: ASP Web HowTo
Subject: [asp_web_howto] email responses
I have a database setup to allow users to submit computer repair
requests to my office. The data from the requests are inserted into my
database. The technicians then, after completing the repairs, complete a
work order form, storing other data into the database for billing. On
the original repair request, users can list an email address; what I
would like to be able to do is: When a technician submits the final work
order, run a routine to send an email to the email address from the
original request with all of the data that is being submitted in the SQL
statement to the database. How do I generate an email and insert session
variables into it?
Thanks in advance,
John Miller
|
|
 |