-
February 13th, 2012, 04:44 PM
#1
Prob using "Style" in HTML Body of Email
I have the following HTML code in a VB5 program sending an Email that "does not" work:
Code:
.Subject = MsgSubject
.HtmlBody = "<html><body style='background-color:FFFF99'>" _
& HtmlBodyFirstPart _
& "</br></br><p2 style=""font-family:arial;color:red;font-size:20px;"">HAPPY BIRTHDAY!</p2>" _
I have the following code that "does" work:
Code:
.Subject = MsgSubject
.HtmlBody = "<html><body style='background-color:FFFF99'>" _
& HtmlBodyFirstPart _
& "</br></br><p2><font size='7' color='red' face='arial'>HAPPY BIRTHDAY!</font></p2>" _
What is wrong with the code using "Style"????
Thanks for your help
Last edited by PeejAvery; February 13th, 2012 at 04:46 PM.
Reason: Added code tags
-
February 13th, 2012, 04:48 PM
#2
Re: Prob using "Style" in HTML Body of Email
Probably because you're styling a non-existent tag. There's no such thing as <p2>.
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
-
February 14th, 2012, 09:27 AM
#3
Re: Prob using "Style" in HTML Body of Email
Originally Posted by DexterRose
I have the following HTML code in a VB5 program sending an Email that "does not" work:
Code:
.Subject = MsgSubject
.HtmlBody = "<html><body style='background-color:FFFF99'>" _
& HtmlBodyFirstPart _
& "</br></br><p2 style=""font-family:arial;color:red;font-size:20px;"">HAPPY BIRTHDAY!</p2>" _
I would suggest you use Three ( 3 ) of these : ", like this :
Code:
.Subject = MsgSubject
.HtmlBody = "<html><body style='background-color:FFFF99'>" _
& HtmlBodyFirstPart _
& "</br></br><p2 style="""font-family:arial;color:red;font-size:20px;""">HAPPY BIRTHDAY!</p2>"
That hsould work. The problem is when you do this :
It closes the existing string and starts a new one!
Yeah, what is P2 by the way?? Does that even work??
-
February 14th, 2012, 09:38 AM
#4
Re: Prob using "Style" in HTML Body of Email
Ah, good catch Hannes! I missed that.
Or you can use single quotes just like you are in the example you provided that does work.
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
-
February 14th, 2012, 03:22 PM
#5
Re: Prob using "Style" in HTML Body of Email
You guessed it! I'm new to HTML. Thanks for the tip!
It's amazing what happens when you use the correct format.
Thanks
-
February 15th, 2012, 02:01 AM
#6
Re: Prob using "Style" in HTML Body of Email
Always glad to help
Please remember to mark your thread resolved.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|