MIME messages not rendered properly in Hotmail/Gmail since server upgrade?!

I sure hope someone can help us with this one, 'cause it’s driving us around the bend!!

We have a message customization/distribution system that takes some template text, substitutes some personal information into the body, and generates/sends a multi-part MIME message from that. It also attaches images, and creates the appropriate CID’s, etc.

It was built several years ago, and has been working beautifully ever since. That is, until we upgraded the server to 8.5.1. I can’t be sure of the exact time the problem started, but it was very close to that time.

Nothing in the application design has changed.

To our knowledge, nothing specifically has changed in the server configuration to alter the MIME handling/encoding methods.

However, now Hotmail & Gmail refuse to render the messages properly - They are almost illegible and the underlying HTML code looks like it’s been truncated all over the place.

Funnily enough, those exact same messages are rendered in Lotus Notes and Yahoo mail exactly as they always have - No problems at all (and the underlying HTML code has been left intact).

I thought the issue may have something to do with the use of custom disclaimers added by the server or client, but the problems persisted after I removed them.

I have had our Internet experts take the exact same HTML code and generate an email message with it to the same accounts, and they render just fine.

I have even generated an extremely simple MIME message using the script from the Help database, and even that will not render properly…

Dim s As New NotesSession

Dim db As NotesDatabase

Dim doc As NotesDocument

Dim body As NotesMIMEEntity

Dim stream As NotesStream

Set db = s.CurrentDatabase

s.ConvertMIME = False

Set doc = db.CreateDocument

Call doc.ReplaceItemValue(“Form”, “Memo”)

Set body = doc.CreateMIMEEntity

Set header = body.CreateHeader(“Subject”)

Call header.SetHeaderVal(“Sample MIME message”)

Set stream = s.CreateStream

Call stream.WriteText(|

top row
column 1column 2
|)

Call body.SetContentFromText( stream, “text/html;charset=iso-8859-1”, ENC_QUOTED_PRINTABLE )

Call doc.Send( False, “xyz@hotmail.com” )

s.ConvertMIME = True

Hotmail refuses to render even this very basic HTML code properly. All I see is the text displayed (albeit, the tables are there).

I can only assume that it is a Domino configuration issue that I am missing somewhere, and we are desperate to find a solution.

If anyone could steer us in the right direction we would be extremely grateful!!

Cheers,

T.

Subject: Solution…

Well, we finally worked it out.

I can’t determine whether it was because of the Domino server upgrades (doubtful now) or a tightening of the other mail systems rendering standards. However, by changing the MIME generation code slightly, I was able to get the messages rendered properly once again.

I can’t tell you EXACTLY which of these changes worked, but the combination of them all did the trick…

Set “MIME-Version” to “1.0”

Rather than using field assignments (e.g. doc.SendTo=“blah”), set MIME headers instead

Explicitly declare “boundary” text to separate the message parts

Switch from a content encoding method of “ENC_QUOTED_PRINTABLE” to “ENC_NONE” for the HTML MIME part

Enclose the character set parameter in quotation marks

To us, these these seemed like extremely insignificant changes, but they made the world of difference. Obviously the logic hadn’t been coded properly in the first place, but we were never aware of the issues since the messages were always rendered properly.

I hope this helps someone else out that may find themselves in the same predicament.