Hello
I have an online form with the following fields: name, email, business, country, message.
The script stoes the data input into a NS Access database and sends a copy of the site visitor's data to the Webmaster - and a copy to the site visitor himself.
This works, but I have since played about with the code so as to make the copy received by the site visitor more atractive (with my own font, colour, and style).
This, then, is the code I used with a view to achieving this:
Dim ObjMail
Set ObjMail = Server.CreateObject("CDO.Message")
ObjMail.To = "sEmailAddress"
ObjMail.CC = "whoever@whatever.com"
ObjMail.BCC = "whoever@whatever.com"
ObjMail.From = sEmailAddress
ObjMail.Subject = "Your submission"
ObjMail.HTMLBody = <font face="verdana" color="navy" size="10pt">sFullNameTitle</font> & vbcrlf&_
sFullName & vbcrlf&_
<font face="verdana" color="navy" size="10pt">sEmailTitle</font> & vbcrlf&_
sEmailAddress & vbcrlf&_
<font face="verdana" color="navy" size="10pt">sBusinessTitle</font> & vbcrlf&_
sBusinessName & vbcrlf&_
<font face="verdana" color="navy" size="10pt">sCountryTitle</font> & vbcrlf&_
sCountryName & vbcrlf&_
MessageName & vbcrlf&_
<font face="verdana" color="navy" size="10pt">MessageTitle</font>
ObjMail.Send
Set ObjMail = Nothing
%>
This generates the following error:
Microsoft VBScript compilation error '800a03ea'
Syntax error
/welcome1.asp, line 70
ObjMail.HTMLBody = <font face="verdana" color="navy" size="10pt">sFullNameTitle</font> & vbcrlf&_
-------------------^
The error suggests that sFullNameTitle is wrong. Or is it my placement of the HTML code?
Many thanks to anyone with a helpful suggestion.
Steve
I have an online form with the following fields: name, email, business, country, message.
The script stoes the data input into a NS Access database and sends a copy of the site visitor's data to the Webmaster - and a copy to the site visitor himself.
This works, but I have since played about with the code so as to make the copy received by the site visitor more atractive (with my own font, colour, and style).
This, then, is the code I used with a view to achieving this:
Dim ObjMail
Set ObjMail = Server.CreateObject("CDO.Message")
ObjMail.To = "sEmailAddress"
ObjMail.CC = "whoever@whatever.com"
ObjMail.BCC = "whoever@whatever.com"
ObjMail.From = sEmailAddress
ObjMail.Subject = "Your submission"
ObjMail.HTMLBody = <font face="verdana" color="navy" size="10pt">sFullNameTitle</font> & vbcrlf&_
sFullName & vbcrlf&_
<font face="verdana" color="navy" size="10pt">sEmailTitle</font> & vbcrlf&_
sEmailAddress & vbcrlf&_
<font face="verdana" color="navy" size="10pt">sBusinessTitle</font> & vbcrlf&_
sBusinessName & vbcrlf&_
<font face="verdana" color="navy" size="10pt">sCountryTitle</font> & vbcrlf&_
sCountryName & vbcrlf&_
MessageName & vbcrlf&_
<font face="verdana" color="navy" size="10pt">MessageTitle</font>
ObjMail.Send
Set ObjMail = Nothing
%>
This generates the following error:
Microsoft VBScript compilation error '800a03ea'
Syntax error
/welcome1.asp, line 70
ObjMail.HTMLBody = <font face="verdana" color="navy" size="10pt">sFullNameTitle</font> & vbcrlf&_
-------------------^
The error suggests that sFullNameTitle is wrong. Or is it my placement of the HTML code?
Many thanks to anyone with a helpful suggestion.
Steve