Delphi: how to compose an email in Outlook without using MAPI?

LaBracca picture LaBracca · Feb 5, 2011 · Viewed 7.5k times · Source

In this question I just asked I told that I prepare Outlook messages by sending data from my app to Outlook with MAPI.

But in this way I have one major hurdle: I cannot send formatted text for the message body. My form has an rtf field, I strip away rtf data then prepare the outlook mail.

How is it possible to do the same (creating an outlook outgoing email ready to be sent) without using mapi, and keeping the formatting, somehow "rtf to html"... Does anyone already have this code?

Answer

Marjan Venema picture Marjan Venema · Feb 5, 2011

Using the Ole Automation Server component wrappers provided by Delphi. An example I dug up for another question recently can be found here: Easiest way to compose Outlook 2010 mail from Delphi?