E-mail with ASP

Results 1 to 2 of 2

Thread: E-mail with ASP

  1. #1
    Charles Guest

    Default E-mail with ASP

    I am able to send e-mails that contain info from a database using SMTP but I wish to make the e-mail body in a paragraph format. When I use the code below, I get an error message about data type.<BR><BR>greeting = "Dear " + RS("name") + ","<BR>message = "Your order was shipped on" + RS("shipdate") <BR><BR>Set objMail = Server.CreateObject("CDONTS.NewMail")<BR>objMail.F rom = "weborders@x.com"<BR>objMail.To = RS("email")<BR>objMail.Subject = "Web Order Shipped"<BR>objMail.Body = greeting & VBCrLF & VBCrLF & message<BR>objMail.Send<BR><BR>Also, the comma appears way after the name.<BR><BR>Thanks in advance!

  2. #2
    Join Date
    Dec 1969

    Default RE: E-mail with ASP

    You can get the comma right after the name by using the trim statement. I&#039m not usre if it has anything to do with your error but I always use & not + to combine strings:<BR>greeting = Trim("Dear " & RS("name") & ",")<BR>I would also add a space after on<BR>message = "Your order was shipped on " & RS("shipdate") <BR><BR><BR><BR>Dennis<BR><BR>

Posting Permissions

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