Solved

CDO email with html code

Posted on 2004-04-28
2
514 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 32

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

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…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

706 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now