Email CDONTS Syntax

Results 1 to 5 of 5

Thread: Email CDONTS Syntax

  1. #1
    Mark G Guest

    Default Email CDONTS Syntax

    Hello,<BR>I&#039m trying to "compose" an email Body that will contain a persons First Name, there UserID and Password (from the form they are submitting). I want it to look like this:<BR><BR>Hello Jimmy,<BR><BR>I would like to thank you for registering with MyDomain.Com.<BR>Your Username is: yomama<BR>Your Password is: 1a2b3c4d<BR>Once again, Thank You and be safe out there,<BR><BR>M. M. Graham<BR><BR>_______________<BR>B elow is the code that I&#039ve started to use<BR>Thank You In Advance,<BR>Mark G<BR><BR>--- Code Below ---<BR><BR>Dim objNewMail <BR> <BR>Set objNewMail = CreateObject("CDONTS.NewMail") <BR>objNewMail.To = Request.Form("email")<BR>objNewMail.From = ""<BR>objNewMail.Subject = "Welcome To MyDomain.Com"<BR>objNewMail.Body = "Hello & Request.Form("firstname"),& CrLf<BR> I would like to thank you for registering with MyDomain.Com & CrLf<BR> Your Username Is: & Request.Form("userID")& vbCrLf<BR> Your Password Is: & Request.Form("password")& vbCrLf<BR> Once again, Thank You and be safe out there,& vbCrLf & vbCrLf<BR> M. M. Graham & vbCrLf<BR>"<BR>objNewMail.Send<BR>objNewMail = Nothing

  2. #2
    Jimmy Wang Guest

    Default RE: Email CDONTS Syntax

    So what&#039s your question?<BR>By the way I looked at your code briefly and there appear to be some errors in it.<BR><BR>Jimmy Wang

  3. #3
    Join Date
    Dec 1969

    Default HERE YA GO! This works, I tested it!...

    Hey, here ya go. Just for the record, the email it sends me looks like this:<BR><BR>Hello Joel,<BR><BR>I would like to thank you for registering with<BR><BR>Your username is: (username)<BR>Your password is: (password)<BR><BR>Once again, Thank You and be safe out there,<BR><BR>M. M. Graham<BR><BR><BR>Here&#039s the code. And YES, it will display the users username password, I just put the words in ()&#039s in the above email display. If you like it and want to keep the spacing and all, do NOT edit it, as I used cdonts and it works now:<BR><BR><BR><BR>You will see I set up the values first and put THEM in the message. Look for a ps at the bottom...<BR><BR>&#060;%<BR>Dim MyBody<BR>Dim MyCDONTSMail<BR>strWho = Request ("firstname")<BR>strTo = Request("email")<BR>strUserid = Request("userid")<BR>strPassword = Request("password")<BR>Set MyCDONTSMail = CreateObject("CDONTS.NewMail")<BR>MyCDONTSMail.Fro m= ""<BR>MyCDONTSMail. To= strTo<BR>MyCDONTSMail.Subject= "Welcome to"<BR>MyBody = MyBody & "Hello " & strWho & "," & vbCrLf & vbCrLf<BR>MyBody = MyBody & "I would like to thank you for registering with " & vbCrLf & vbCrLf<BR>MyBody = MyBody & "Your username is: " & strUserid & " " & vbCrLf <BR>MyBody = MyBody & "Your password is: " & strPassword & " " & vbCrLf & vbCrLf<BR>MyBody = MyBody & "Once again, Thank You and be safe out there," & vbCrLf & vbCrLf<BR>MyBody = MyBody & "M. M. Graham" & vbCrLf<BR>MyBody = MyBody & "" & vbCrLf<BR>MyCDONTSMail.Body= MyBody<BR>MyCDONTSMail.Send<BR>set MyCDONTSMail=nothing<BR>%&#062;<BR>&#039End OF CODE<BR><BR>PS. If you look at the code, you may see a space before the ", well, keep it, so you can display <BR><BR>"Hello, Joel" in the email as opposed to<BR>"HelloJoel"<BR><BR>Just leave it be.<BR><BR>The trick is to declare the variables at first.<BR>Get it to work and it&#039s fine the way it is. HOWEVER, <BR>the one thing I would change is the syntax in the line:<BR><BR>Once again, Thank You and be safe out there,<BR><BR>Unless you want Thank You with capital T and Y. If not, <BR>replace them in the code to lowercase...that&#039s it!<BR><BR>Questions?<BR>joel@21stcenturynetwork.n et

  4. #4
    Join Date
    Dec 1969


    Anyone, Start at the begining of this thread to see one of the coolest (and easiest) CDONTS that someone has explained for me.<BR><BR>Thanks JOEL

  5. #5
    Join Date
    Dec 1969

    Default Geat! Your welcome...

    As one who has asked plenty, it&#039s nice to start giving...I love cdont&#039s for email...have a good one.<BR><BR>Joel

Posting Permissions

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