Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: email?


Message #1 by "John P. Miller" <jpmiller@a...> on Thu, 23 Aug 2001 09:46:24 -0400
I need to automatically generate an email and insert session variables 

into it. I am doing an SQL Insert statement and I want to send the same 

information that I am inserting into my database to an email address 

also. How can I do this?



Thanks in advance,

John Miller

Message #2 by "Alex Shiell, ITS, EC, SE" <alex.shiell@s...> on Thu, 23 Aug 2001 16:35:44 +0100
you've already asked this question and 3 of us have answered it!



use CDONTS



    Set oMail = Server.CreateObject("CDONTS.Newmail")



    With oMail

        .To = sRecip

        .From = sFrom

        .Subject = sSubject

        .Body = sMessage

        .send

    End With

                

    Set oMail = Nothing



-----Original Message-----

From: John P. Miller [mailto:jpmiller@a...]

Sent: 23 August 2001 14:46

To: ASP Web HowTo

Subject: [asp_web_howto] email?





I need to automatically generate an email and insert session variables 

into it. I am doing an SQL Insert statement and I want to send the same 

information that I am inserting into my database to an email address 

also. How can I do this?



Thanks in advance,

John Miller

Message #3 by "Coffey, Dana" <dcoffey@B...> on Thu, 23 Aug 2001 08:53:36 -0700
John,



do it like this:



After doing your insert, then construct a body variable:



strMailBody = "The values I inserted in the db are as follows" & chr(13)

strMailBody = strMailBody & "Value One: " & var_one & chr(13)





etc etc etc

Then, either use the CDONTS mail component, or a third party one such as

aspEmail (www.aspEmail.com) and follow the documentation to construct and

mail out the info.  Use yourself as the mailto address and you will see how

your mail body looks.



hth,

dana





(Alex,yeah I have no patience either..... at least tomorrow is friday)



-----Original Message-----

From: Alex Shiell, ITS, EC, SE [mailto:alex.shiell@s...]

Sent: Thursday, August 23, 2001 10:36 AM

To: ASP Web HowTo

Subject: [asp_web_howto] RE: email?





you've already asked this question and 3 of us have answered it!



use CDONTS



    Set oMail = Server.CreateObject("CDONTS.Newmail")



    With oMail

        .To = sRecip

        .From = sFrom

        .Subject = sSubject

        .Body = sMessage

        .send

    End With

                

    Set oMail = Nothing



-----Original Message-----

From: John P. Miller [mailto:jpmiller@a...]

Sent: 23 August 2001 14:46

To: ASP Web HowTo

Subject: [asp_web_howto] email?





I need to automatically generate an email and insert session variables 

into it. I am doing an SQL Insert statement and I want to send the same 

information that I am inserting into my database to an email address 

also. How can I do this?



Thanks in advance,

John Miller


  Return to Index