HTML format preservation

  • Thread starter Thread starter Jim
  • Start date Start date
J

Jim

Hello,

I'm trying to send HTML format messages. My Exchange server is version 6.5.

I generate mail messages by programatically composing my message text with
HTML (e.g. <html> <body>Hello World</body></HTML>) and assigning it to the
..HTMLbody property of the message object.
I then send the message to a specified address. When I send the message to
an account on the local mail server the message content is presented with
layout and formatting I've composed. HOWEVER, when I send the message to an
outside account(e.g. hotmail or yahoo mail) the HTML formatting is lost and
I get and non-formatted message that looks pretty ugly.

What do I need to change to get my messages to retain their HTML body
format? I know it's possible because I receive many of them every day. I
haven't found a solution however. Can someone comment and/or point me to an
example of a solution?

Thanks!

Jim M.
 
How any HTML you create is changed on send depends on the Outlook version
you're using and whether or not WordMail is being used for the items.

You will need to examine the HTML you get that looks correctly formatted and
how what you are sending is getting changed. You need to work with the HTML
limitations imposed by Outlook.

Most of the formatted emails you are getting are either not using Outlook or
they are following the restrictions imposed on Outlook HTML in the name of
security.
 
Ken,

Thanks for the response.

I've examined the html before send and what's received on mail server(Do I
need to look at the msg rec'd over the internet at different address?) What
problems am I looking for. This seems like pretty simple html content.:

Source of msg received on my mail server:
<HTML> <style type='text/css'> .style1 {width: 150px;}.style2{width:
100px;}.style3{ width: auto;} </style>
<HEAD> <TITLE>DURA SUPREME SPIFF STATEMENT</TITLE> </HEAD>
<BR><A HREF= 'http://www.durasupreme.com'><IMG SRC =
'C:\Users\jimm\Documents\Promo ID_files\image002.jpg'ALIGN= 'center'></a>
<!--width='100' height='100'-->
<BODY> <P> <STRONG>Dura Supreme, Inc.</STRONG><BR> <EM>300 Dura
Drive</EM><BR> <EM>Howard Lake, MN 55349</EM><BR> <BR>
<EM>1-888-711-3872</EM><BR>
<BR> Statement Date: 08/24/2009 <BR>
<BR> SalesName <BR> PersonAddr<BR> PersonTown, State, Zip<BR> Sales Person
Promotion ID: <strong>IDNumber</strong> <BR>
<BR> <HR NOSHADE color = 'Black'> <BR>
<table border = '1', rules = 'rows', cellpadding = '2' frame = 'below'>
<CAPTION>Preliminary List of Qualifying Orders</CAPTION>
<TR ALIGN = 'left'> <TD> Order #</TD> <TD>PO #</TD><TD>Mark Carton</TD><TD
class= 'style2'>Est. Cabinets</TD><TD class = 'style1'> Estimated
Amount</TD></TR>
<TR ALIGN = 'left'> <TD>718746</TD> <TD>SM 10336</TD><TD> ZIERDEN
KILGORE</TD> <TD class='style2'>14.00</TD><TD
class='style1'>140.00</TD></TR>
<TR ALIGN = 'left'> <TD>718748</TD> <TD>SM10338</TD><TD> ZIERDEN
KILGOREB</TD> <TD class='style2'>5.00</TD><TD class='style1'>50.00</TD></TR>
<TR ALIGN = 'left'> <TD>718749</TD> <TD>SM10341</TD><TD> ZIERDEN
KILGORE</TD> <TD class='style2'>1.00</TD><TD class='style1'>10.00</TD></TR>
<TR ALIGN = 'left'> <TD>718795</TD> <TD>SM 10337</TD><TD> ZIERDEN
KILGOREM</TD> <TD class='style2'>2.00</TD><TD class='style1'>20.00</TD></TR>
<TR ALIGN = 'left'> <TD>719037</TD> <TD>SM10359</TD><TD> STROMQUIST</TD> <TD
class='style2'>4.00</TD><TD class='style1'>40.00</TD></TR>
<tr><td colspan = '5' align = 'right' >Total: $260.00 </td></tr>
</TABLE>
<BR> If you have questions about this statement please contact Customer
Service.<BR> PHONE: (888) 711-3872</BODY>
</HTML>



Source of msg before assignment to the HTMLbody of the email during
creation:
<HTML> <style type='text/css'> .style1 {width: 150px;}.style2{width:
100px;}.style3{ width: auto;} </style>
<HEAD> <TITLE>DURA SUPREME SPIFF STATEMENT</TITLE> </HEAD>
<BR><A HREF= 'http://www.durasupreme.com'><IMG SRC =
'C:\Users\jmccoy\Documents\Promo ID_files\image002.jpg'ALIGN= 'center'></a>
<!--width='100' height='100'--> <BODY>
<P> <STRONG>Dura Supreme, Inc.</STRONG><BR> <EM>300 Dura Drive</EM><BR>
<EM>Howard Lake, MN 55349</EM><BR>
<BR> <EM>1-888-711-3872</EM><BR>
<BR> Statement Date: 08/25/2009 <BR>
<BR> SalesName <BR> PersonAddr<BR> PersonTown, State, Zip<BR> Sales Person
Promotion ID: <strong>IDNumber</strong> <BR>
<BR> <HR NOSHADE color = 'Black'> <BR>
<table border = '1', rules = 'rows', cellpadding = '2' frame = 'below'>
<CAPTION>Preliminary List of Qualifying Orders</CAPTION>
<TR ALIGN = 'left'> <TD> Order #</TD> <TD>PO #</TD><TD>Mark Carton</TD><TD
class= 'style2'>Est. Cabinets</TD><TD class = 'style1'> Estimated
Amount</TD></TR>
<TR ALIGN = 'left'> <TD>718746</TD> <TD>SM 10336</TD><TD> ZIERDEN
KILGORE</TD> <TD class='style2'>14.00</TD><TD
class='style1'>140.00</TD></TR>
<TR ALIGN = 'left'> <TD>718748</TD> <TD>SM10338</TD><TD> ZIERDEN
KILGOREB</TD> <TD class='style2'>5.00</TD><TD class='style1'>50.00</TD></TR>
<TR ALIGN = 'left'> <TD>718749</TD> <TD>SM10341</TD><TD> ZIERDEN
KILGORE</TD> <TD class='style2'>1.00</TD><TD class='style1'>10.00</TD></TR>
<TR ALIGN = 'left'> <TD>718795</TD> <TD>SM 10337</TD><TD> ZIERDEN
KILGOREM</TD> <TD class='style2'>2.00</TD><TD class='style1'>20.00</TD></TR>
<TR ALIGN = 'left'> <TD>719037</TD> <TD>SM10359</TD><TD> STROMQUIST</TD> <TD
class='style2'>4.00</TD><TD class='style1'>40.00</TD></TR>
<tr><td colspan = '5' align = 'right' >Total: $260.00 </td></tr>
</TABLE>
<BR> If you have questions about this statement please contact Customer
Service.<BR> PHONE: (888) 711-3872</BODY>
</HTML>
 
If your problem is with emails sent out of organization, then yes you need
to look at what's being received.

I'm no HTML expert and I'm not about to try to analyze all that HTML you
posted. You're going to have to do the detective work to see what's being
altered and how, and how that affects how the HTML emails display when
received. Moreover, I still have no idea what you are using to send the
emails and how, so that would make it even harder to figure out what's going
on.

You can also google for information on how each version of Outlook handles
and restricts HTML, such as not using CSS or whatever. That depends also on
Outlook version and whether or not WordMail is being used.
 
Ken,

In this instance, I'm creating the message using Access 2007/VBA with
references to the Outlook library and to Dimitry's Redemption library, which
I'm using to bypass the security prompts. Using the Outlook mail item object
I create the message object and assign message content and then save,
assign to the Redemption mail object and invoke the Send method/function.

Below is the same message received in a Hotmail account. Included is the
header information. I don't know much about this but I do notice that the
content-type is text/plain. It seems it ought to be text/html. Not sure
how to change these settings. -- JimM

X-Message-Delivery: Vj0xLjE7dXM9MDtsPTA7YT0xO0Q9MTtTQ0w9MA==
X-Message-Status: n:0
X-SID-PRA: Jimm<[email protected]>
X-Message-Info:
JGTYoYF78jFShgg23ljGMOwCigthg/rOwtanBQaf7XxSi8SaWFGK85cvbvWz5u2fdZ08NPTbdyqGuj5T2zok8TEJaueUtncx
Received: from willow.durasupreme.com ([64.198.39.204]) by
col0-mc2-f17.Col0.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959);
Mon, 24 Aug 2009 14:49:02 -0700
Received: From maple.durasupreme.com ([192.168.1.9]) by
willow.durasupreme.com (WebShield SMTP v4.5 MR3)
id 1251150541182; Mon, 24 Aug 2009 16:49:01 -0500
X-MimeOLE: Produced By Microsoft Exchange V6.5
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Subject: Dura Supreme -- Spiff Statement
Date: Mon, 24 Aug 2009 16:48:47 -0500
Message-ID: <[email protected]>
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
Thread-Topic: Dura Supreme -- Spiff Statement
Thread-Index: AcolBLDYhzoc6+flQeugdkaUkzmO9g==
From: "Jimm" <[email protected]>
To: "Jimm" <[email protected]>
Return-Path: (e-mail address removed)
X-OriginalArrivalTime: 24 Aug 2009 21:49:02.0996 (UTC)
FILETIME=[B2009540:01CA2504]

<http://www.durasupreme.com> =20

Dura Supreme, Inc.
300 Dura Drive
Howard Lake, MN 55349

1-888-711-3872

Statement Date: 08/24/2009=20

PersonName=20
Street
City, State, Zip
Sales Person Promotion ID: IDnum =20


________________________________



Preliminary List of Qualifying Orders
Order # PO # Mark Carton Est. Cabinets Estimated Amount=09
718746 SM 10336 ZIERDEN KILGORE 14.00 140.00=09
718748 SM10338 ZIERDEN KILGOREB 5.00 50.00=09
718749 SM10341 ZIERDEN KILGORE 1.00 10.00=09
718795 SM 10337 ZIERDEN KILGOREM 2.00 20.00=09
719037 SM10359 STROMQUIST 4.00 40.00=09
Total: $260.00 =09

If you have questions about this statement please contact Customer
Service.
PHONE: (888) 711-3872

*************************end of misformatted
message******************************************************
 
Well obviously if your emails are being converted into plain text they won't
preserve any HTML formatting.

Can you send any HTML over the Internet at all? If not then maybe it's a
setting on the server.

I don't know of any Outlook setting offhand that converts all HTML to plain
text on a global basis, but since you still haven't told us what version of
Outlook you use I couldn't even check that at all.




jpm said:
Ken,

In this instance, I'm creating the message using Access 2007/VBA with
references to the Outlook library and to Dimitry's Redemption library,
which I'm using to bypass the security prompts. Using the Outlook mail
item object I create the message object and assign message content and
then save, assign to the Redemption mail object and invoke the Send
method/function.

Below is the same message received in a Hotmail account. Included is the
header information. I don't know much about this but I do notice that the
content-type is text/plain. It seems it ought to be text/html. Not sure
how to change these settings. -- JimM

X-Message-Delivery: Vj0xLjE7dXM9MDtsPTA7YT0xO0Q9MTtTQ0w9MA==
X-Message-Status: n:0
X-SID-PRA: Jimm<[email protected]>
X-Message-Info:
JGTYoYF78jFShgg23ljGMOwCigthg/rOwtanBQaf7XxSi8SaWFGK85cvbvWz5u2fdZ08NPTbdyqGuj5T2zok8TEJaueUtncx
Received: from willow.durasupreme.com ([64.198.39.204]) by
col0-mc2-f17.Col0.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959);
Mon, 24 Aug 2009 14:49:02 -0700
Received: From maple.durasupreme.com ([192.168.1.9]) by
willow.durasupreme.com (WebShield SMTP v4.5 MR3)
id 1251150541182; Mon, 24 Aug 2009 16:49:01 -0500
X-MimeOLE: Produced By Microsoft Exchange V6.5
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Subject: Dura Supreme -- Spiff Statement
Date: Mon, 24 Aug 2009 16:48:47 -0500
Message-ID:
<[email protected]>
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
Thread-Topic: Dura Supreme -- Spiff Statement
Thread-Index: AcolBLDYhzoc6+flQeugdkaUkzmO9g==
From: "Jimm" <[email protected]>
To: "Jimm" <[email protected]>
Return-Path: (e-mail address removed)
X-OriginalArrivalTime: 24 Aug 2009 21:49:02.0996 (UTC)
FILETIME=[B2009540:01CA2504]

<http://www.durasupreme.com> =20

Dura Supreme, Inc.
300 Dura Drive
Howard Lake, MN 55349

1-888-711-3872

Statement Date: 08/24/2009=20

PersonName=20
Street
City, State, Zip
Sales Person Promotion ID: IDnum =20


________________________________



Preliminary List of Qualifying Orders
Order # PO # Mark Carton Est. Cabinets Estimated Amount=09
718746 SM 10336 ZIERDEN KILGORE 14.00 140.00=09
718748 SM10338 ZIERDEN KILGOREB 5.00 50.00=09
718749 SM10341 ZIERDEN KILGORE 1.00 10.00=09
718795 SM 10337 ZIERDEN KILGOREM 2.00 20.00=09
719037 SM10359 STROMQUIST 4.00 40.00=09
Total: $260.00 =09

If you have questions about this statement please contact Customer
Service.
PHONE: (888) 711-3872

*************************end of misformatted
message******************************************************
 
Outlook version: 2007.
I've resolved the problem. Needed to provide settings for Redemption mail
object after I assign the mail object to it. Apparently setting the mail
object's .HTMLBody before passing it to Redemption wasn't sufficient.
See: http://www.dimastr.com/redemption/faq.htm#11

Ken, thanks for all your help.




Ken Slovak - said:
Well obviously if your emails are being converted into plain text they
won't preserve any HTML formatting.

Can you send any HTML over the Internet at all? If not then maybe it's a
setting on the server.

I don't know of any Outlook setting offhand that converts all HTML to
plain text on a global basis, but since you still haven't told us what
version of Outlook you use I couldn't even check that at all.




jpm said:
Ken,

In this instance, I'm creating the message using Access 2007/VBA with
references to the Outlook library and to Dimitry's Redemption library,
which I'm using to bypass the security prompts. Using the Outlook mail
item object I create the message object and assign message content and
then save, assign to the Redemption mail object and invoke the Send
method/function.

Below is the same message received in a Hotmail account. Included is the
header information. I don't know much about this but I do notice that the
content-type is text/plain. It seems it ought to be text/html. Not sure
how to change these settings. -- JimM

X-Message-Delivery: Vj0xLjE7dXM9MDtsPTA7YT0xO0Q9MTtTQ0w9MA==
X-Message-Status: n:0
X-SID-PRA: Jimm<[email protected]>
X-Message-Info:
JGTYoYF78jFShgg23ljGMOwCigthg/rOwtanBQaf7XxSi8SaWFGK85cvbvWz5u2fdZ08NPTbdyqGuj5T2zok8TEJaueUtncx
Received: from willow.durasupreme.com ([64.198.39.204]) by
col0-mc2-f17.Col0.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959);
Mon, 24 Aug 2009 14:49:02 -0700
Received: From maple.durasupreme.com ([192.168.1.9]) by
willow.durasupreme.com (WebShield SMTP v4.5 MR3)
id 1251150541182; Mon, 24 Aug 2009 16:49:01 -0500
X-MimeOLE: Produced By Microsoft Exchange V6.5
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Subject: Dura Supreme -- Spiff Statement
Date: Mon, 24 Aug 2009 16:48:47 -0500
Message-ID:
<[email protected]>
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
Thread-Topic: Dura Supreme -- Spiff Statement
Thread-Index: AcolBLDYhzoc6+flQeugdkaUkzmO9g==
From: "Jimm" <[email protected]>
To: "Jimm" <[email protected]>
Return-Path: (e-mail address removed)
X-OriginalArrivalTime: 24 Aug 2009 21:49:02.0996 (UTC)
FILETIME=[B2009540:01CA2504]

<http://www.durasupreme.com> =20

Dura Supreme, Inc.
300 Dura Drive
Howard Lake, MN 55349

1-888-711-3872

Statement Date: 08/24/2009=20

PersonName=20
Street
City, State, Zip
Sales Person Promotion ID: IDnum =20


________________________________



Preliminary List of Qualifying Orders
Order # PO # Mark Carton Est. Cabinets Estimated Amount=09
718746 SM 10336 ZIERDEN KILGORE 14.00 140.00=09
718748 SM10338 ZIERDEN KILGOREB 5.00 50.00=09
718749 SM10341 ZIERDEN KILGORE 1.00 10.00=09
718795 SM 10337 ZIERDEN KILGOREM 2.00 20.00=09
719037 SM10359 STROMQUIST 4.00 40.00=09
Total: $260.00 =09

If you have questions about this statement please contact Customer
Service.
PHONE: (888) 711-3872

*************************end of misformatted
message******************************************************
 
Ah, OK. I didn't know you were doing it with Redemption. That explains the
problem.
 
Back
Top