Emails from web site sometimes blank or gibberish

Outlook is very forgiving of formatting errors, and has been very good at introducing them. Try delivering them to a store where you can look at them in raw format. A local mailbox or Maildir store on the server would be ideal.

ContentHeaders may be checked by both desktop clients and webmail clients. Don't assume because it is webmail it supports HTML. Several webmail applications default to text mode due to security issues with HTML.

Ideally you should generate a multi-part MIME with both text and HTML format. This is the most flexible option. Properly done it should display well everywhere.


It could be that their e-mail client doesn't automatically pick up that it is HTML. You could explicitly add the ContentHeaders HTML (I can't remember exact spelling) into the headers of the generated e-mail.