Solved

CDO email with html code

Posted on 2004-04-28
2
520 Views
Last Modified: 2012-08-14
trying to send this email  with html code in the body but i get this error
Microsoft VBScript compilation error '800a0401'

Expected end of statement

/2004fallregistrationnew.asp, line 148

objCDOSYSMail.HTMLBody =" Thank you very much for registering for the FC PRIDE 2004 fall try-outs. Please make sure that your player brings a ball, shin guards, and water for all try-out sessions. All sessions will take place behind the Lawrence Soccer Complex- South Concession Stand.<BR> Please arrive 30 minutes prior to your try-outs to complete your registration. <BR> Please check the FC Pride website <a href="http://www.fcpride.org/">www.fcpride.org</a> in the event of poor weather. <BR> Brent Paulson <br> <a href="mailto:bep@fcpride.org">bep@fcpride.org</a>"
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------^
this is my code ... what am i doing wrong??

'Dimension variables
Dim objCDOSYSCon
   
'Create the e-mail server object
Set objCDOSYSMail = Server.CreateObject("CDO.Message")
Set objCDOSYSCon = Server.CreateObject ("CDO.Configuration")
'Set and update fields properties
'Out going SMTP server
objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "192.168.111.2"
'SMTP port
objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport")  = 25
'CDO Port
objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
'Timeout
objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
objCDOSYSCon.Fields.Update

'Update the CDOSYS Configuration
Set objCDOSYSMail.Configuration = objCDOSYSCon
'Who the e-mail is from
objCDOSYSMail.From = "bep@fcpride.org"
'Who the e-mail is sent to
objCDOSYSMail.To = request.Form("email")
'The subject of the e-mail
objCDOSYSMail.Subject = "2004 Spring Player Application Confirmation Letter"


'Set the e-mail body format (HTMLBody=HTML TextBody=Plain)
objCDOSYSMail.HTMLBody =" Thank you very much for registering for the FC PRIDE 2004 fall try-outs. Please make sure that your player brings a ball, shin guards, and water for all try-out sessions. All sessions will take place behind the Lawrence Soccer Complex- South Concession Stand.<BR> Please arrive 30 minutes prior to your try-outs to complete your registration. <BR> Please check the FC Pride website <a href="http://www.fcpride.org/">www.fcpride.org</a> in the event of poor weather. <BR> Brent Paulson <br> <a href="mailto:bep@fcpride.org">bep@fcpride.org</a>"
objCDOSYSMail.Send
Set objCDOSYSMail = Nothing
Set objCDOSYSCon = Nothing
0
Comment
Question by:gianitoo
2 Comments
 
LVL 33

Accepted Solution

by:
Big Monty earned 500 total points
ID: 10944068
you need to double up the quotes:

objCDOSYSMail.HTMLBody =" Thank you very much for registering for the FC PRIDE 2004 fall try-outs. Please make sure that your player brings a ball, shin guards, and water for all try-out sessions. All sessions will take place behind the Lawrence Soccer Complex- South Concession Stand.<BR> Please arrive 30 minutes prior to your try-outs to complete your registration. <BR> Please check the FC Pride website <a href=""http://www.fcpride.org/"">www.fcpride.org</a> in the event of poor weather. <BR> Brent Paulson <br> <a href=""mailto:bep@fcpride.org"">bep@fcpride.org</a>"

B.D.
0
 
LVL 1

Author Comment

by:gianitoo
ID: 10944177
Bingo
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question