469,271 Members | 1,014 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,271 developers. It's quick & easy.

Double Quotes Problem

Hi

I want to send e-mails using an asp page
first I create the mail Object: Set objMail =
Server.CreateObject("CDONTS.NewMail")

After I fill a variable with the html code that will be the mail

txtMailBody = "<html>"
txtMailBody = txtMailBody & "<center>Hi <BR> This is a test"
txtMailBody = txtMailBody & "</html>"

finally I send the mail using the following code:
objMail.Body = txtMailBody
objMail.Send

I got a "double quote" problem when I try to give a background color for the
html page
txtMailBody = "<html bgcolor="#FFCC33">"

Is there a way to accomplish this

Thanks for all
Jul 19 '05 #1
3 5923
Ice Man wrote on 19 sep 2003 in microsoft.public.inetserver.asp.general:
I got a "double quote" problem when I try to give a background color
for the html page
txtMailBody = "<html bgcolor="#FFCC33">"


txtMailBody = "<html bgcolor='#FFCC33'>"

Can bgcolor be a attribute of the <html> tag, however?
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 19 '05 #2
Gazing into my crystal ball I observed "Evertjan."
<ex**************@interxnl.net> writing in news:Xns93FB6E09682F7eejj99@
194.109.133.29:
Ice Man wrote on 19 sep 2003 in microsoft.public.inetserver.asp.general:
I got a "double quote" problem when I try to give a background color
for the html page
txtMailBody = "<html bgcolor="#FFCC33">"


txtMailBody = "<html bgcolor='#FFCC33'>"

Can bgcolor be a attribute of the <html> tag, however?


No, it can't. It can be an attribute of the Body element, albeit
depreciated. Best method is to put everything into a style element in the
head element.

txtMailBody = "<html><head><title>Mail Message</title><style type=" & chr
(34) & "text/css" & chr(034) & ">body {background-color:#FFCC33}</style>
</head><body>Email message</body></html>"

--
Adrienne Boswell
Please respond to the group so others can share
http://www.arbpen.com
Jul 19 '05 #3
I got a "double quote" problem when I try to give a background color for the html page
txtMailBody = "<html bgcolor="#FFCC33">"


The solution for a double quote problem is to double your quotes :

txtMailBody = "<html bgcolor=""#FFCC33"">"

Meindert, MCP
Jul 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

11 posts views Thread by Jakanapes | last post: by
5 posts views Thread by Joel | last post: by
4 posts views Thread by (PeteCresswell) | last post: by
6 posts views Thread by =?Utf-8?B?R2Vvcmdl?= | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.