Select Page
This entry has been published on 2017-11-16 and may be out of date.

Last Updated on 2017-11-16.

[:en]By default, the Simple MAPI protocol, which can be used in Windows to send commands to email client software, does not support the creation of HTML mails.

But there is a simple way to accomplish this, called the “Outlook Express hack”, as it also worked with OE years ago.

Basically, set the body text to NULL. As first attachment, add an HTML file which contains your code. This file’s content will be used as the mail’s body content.

Example using the Simple-MAPI.NET wrapper:

mapi.Attach(filepath: "c:\mymail.html");
mapi.Send(subject: "a subject", noteText: null);

Untested in Outlook, but definitely works with eM Client.[:]