CDOSYS and CSS being ignored

CDOSYS and CSS being ignored

am 20.08.2007 14:09:54 von James

Hello,
I've been testing HTML messages both with CreateMHTMLBody and
HTMLBody, the problem is that the message delivered does not display
css styles correctly. If I use "style" inside html tags within the
"body" the style is applyed. But if I put the styles within the "head"
tags and then reference to them with "class" the styles get completely
ignored.

The complete html code obviusly displays well on browsers.

Here are few lines of code

Set objMail = CreateObject("CDO.Message")
objMail.From = "x@f.com'
objMail.To = "b@g.com"
objMail.Subject = "sbj"

txt = txt & ""
txt = txt & ""
txt = txt & ""
txt = txt & ""
txt = txt & ""
txt = txt & ""
txt = txt & "

applied

"
txt = txt & "

not applied

"
txt = txt & ""
txt = txt & ""

objMail.HTMLBody = txt
objMail.Send()
set objMail = Nothing

Thanks and happy coding
J

Re: CDOSYS and CSS being ignored

am 20.08.2007 22:11:29 von Anthony Jones

"James" wrote in message
news:530jc3dh4uetm77crcb75dff8np2q38pai@4ax.com...
> Hello,
> I've been testing HTML messages both with CreateMHTMLBody and
> HTMLBody, the problem is that the message delivered does not display
> css styles correctly. If I use "style" inside html tags within the
> "body" the style is applyed. But if I put the styles within the "head"
> tags and then reference to them with "class" the styles get completely
> ignored.
>
> The complete html code obviusly displays well on browsers.
>
> Here are few lines of code
>
> Set objMail = CreateObject("CDO.Message")
> objMail.From = "x@f.com'
> objMail.To = "b@g.com"
> objMail.Subject = "sbj"
>
> txt = txt & ""
> txt = txt & ""
> txt = txt & ""
> txt = txt & ""
> txt = txt & ""
> txt = txt & ""
> txt = txt & "

applied

"
> txt = txt & "

not applied

"
> txt = txt & ""
> txt = txt & ""
>
> objMail.HTMLBody = txt
> objMail.Send()
> set objMail = Nothing
>


Ignored by what? Outlook Express? Outlook? Thunderbird? A Web based email
agent like Gmail or hotmail?



--
Anthony Jones - MVP ASP/ASP.NET

Re: CDOSYS and CSS being ignored

am 21.08.2007 18:54:51 von James

On Mon, 20 Aug 2007 21:11:29 +0100, "Anthony Jones" wrote:

>Ignored by what? Outlook Express? Outlook? Thunderbird? A Web based email
>agent like Gmail or hotmail?

Ignored by Gmail web interface, OE displays both solutions correctly.

Anyway I do receive html mails with css in the head, as a matter of
fact the MSDN newsletter has css in the head and looks perfect via
web.

What can it be?

Thanks
J

Re: CDOSYS and CSS being ignored

am 21.08.2007 19:07:55 von Anthony Jones

"James" wrote in message
news:pq5mc3dcugffuu2bppem2ne1iem9lupdnk@4ax.com...
> On Mon, 20 Aug 2007 21:11:29 +0100, "Anthony Jones" wrote:
>
> >Ignored by what? Outlook Express? Outlook? Thunderbird? A Web based
email
> >agent like Gmail or hotmail?
>
> Ignored by Gmail web interface, OE displays both solutions correctly.
>
> Anyway I do receive html mails with css in the head, as a matter of
> fact the MSDN newsletter has css in the head and looks perfect via
> web.
>
> What can it be?
>

I don't know anything about GMail you would have to ask some where more
appropriate for GMail questions.


--
Anthony Jones - MVP ASP/ASP.NET

Re: CDOSYS and CSS being ignored

am 02.09.2007 16:07:17 von Bob Milutinovic

"James" wrote in message
news:pq5mc3dcugffuu2bppem2ne1iem9lupdnk@4ax.com...
> On Mon, 20 Aug 2007 21:11:29 +0100, "Anthony Jones" wrote:
>
>>Ignored by what? Outlook Express? Outlook? Thunderbird? A Web based email
>>agent like Gmail or hotmail?
>
> Ignored by Gmail web interface, OE displays both solutions correctly.
>
> Anyway I do receive html mails with css in the head, as a matter of
> fact the MSDN newsletter has css in the head and looks perfect via
> web.
>
> What can it be?

Examine the names used for class definitions in the working MSDN newsletter,
then examine yours.

It's quite possible that you've used one or more names which overlap those
used by Google.

--
Bob Milutinovic
Cognicom - "Australia's Web Presence Specialists"
http://www.cognicom.net.au/
telephone (0417) 45-77-66
facsimile (02) 9824-2240