CDONTS - body variable

Results 1 to 3 of 3

Thread: CDONTS - body variable

  1. #1
    jason Guest

    Default CDONTS - body variable

    I am trying to send a Password to a user who has lost their password usind CDONTS.<BR><BR>I can send e-mail but I am having trouble figuring out how to take the SQL string that gets the Password then pass it to the BODY of the CDONTs email message.<BR><BR>Here is my code, what would you do???<BR>_________________________________________ ____ <BR><BR>&#060;%@ LANGUAGE="VBScript" %&#062;<BR>&#060;!--#include file=""--&#062;<BR>&#060;!--#include file="IASUtil.asp"--&#062;<BR>&#060;%<BR>if Request.Form("email")=" " then<BR>Response.Redirect "default.asp"<BR>end if<BR>%&#062;<BR>&#060;%<BR>Dim email, RS, Password<BR>%&#062;<BR>&#060;%<BR> Set Connection = Server.CreateObject("ADODB.Connection")<BR> Connection.Open "exemptionsa"<BR><BR> email = LCase(Request.Form("email"))<BR> Set RS = Connection.Execute("SELECT Password FROM Passwords WHERE email = &#039" & email & "&#039")<BR><BR>%&#062;<BR><BR>&#060;%<BR>Set theMail=server.CreateObject("CDONTS.NewMail")<BR>t heMail.Body= "Here is your password" ?????? "."<BR>theMail.From=""<BR>theMai"email")<BR>theMail.Subject="You r Request from IFTA, Inc."<BR>theMail.BodyFormat=1<BR>theMail.Send<BR>S et theMail = Nothing<BR>%&#062;<BR>Your Password has been sent to your e-mail address that you provided.<BR>&#060;/body&#062;<BR>&#060;/html&#062;<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: CDONTS - body variable

    Jason,<BR>theMail.Body= "Here is your password" & RS("email") & "."<BR><BR>You should also test RS.EOF to ensure that you have a record.<BR>- Chris<BR>

  3. #3
    jason Guest

    Default RE: CDONTS - body variable

    thank you very much, and I should have posted it when I fixed it<BR><BR>for someone reason I did the same command you posted, totally by accident mind you and IT WORKED!!!<BR><BR>thanks for the reply none the less!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts