Monday 29 June 2009

Outlook 2007 and HTML email

Well, this can seem to be a little of topic :)

I was generating HTML e-mails that are sent via SharePoint (SendEmail method). But the e-mail wouldn´t render correctly in Outlook 2007. The e-mail was just cut off in Outlook 2007. I ran the HTML that was generated in validators and making sure that all tags was closed but nothing seemed to make me come closer to the solution.

Finnaly I stumbled across the solution! The problem was that I created a long string without linebreaks (\r\n)!

So my guess is that Outlook 2007 reads the HTML into a pre-definied string buffer and the parses it for output and in this case the HTML I sent was to long for this buffer.

No comments: