Мне удалось открыть MS Outlook 2007 с электронной почтой в формате HTML. Я сделал это с помощью SWT OLE API. Вот учебник по Vogela: http://www.vogella.com/articles/EclipseMicrosoftIntegration/article.html
В учебном пособии говорится, что это также работает для не-RCP Java.
public void sendEMail()
{
OleFrame frame = new OleFrame(getShell(), SWT.NONE);
// This should start outlook if it is not running yet
OleClientSite site = new OleClientSite(frame, SWT.NONE, "OVCtl.OVCtl");
site.doVerb(OLE.OLEIVERB_INPLACEACTIVATE);
// Now get the outlook application
OleClientSite site2 = new OleClientSite(frame, SWT.NONE, "Outlook.Application");
OleAutomation outlook = new OleAutomation(site2);
OleAutomation mail = invoke(outlook, "CreateItem", 0 /* Mail item */).getAutomation();
setProperty(mail, "BodyFormat", 2 /* HTML */);
setProperty(mail, "Subject", subject);
setProperty(mail, "HtmlBody", content);
if (null != attachmentPaths)
{
for (String attachmentPath : attachmentPaths)
{
File file = new File(attachmentPath);
if (file.exists())
{
OleAutomation attachments = getProperty(mail, "Attachments");
invoke(attachments, "Add", attachmentPath);
}
}
}
invoke(mail, "Display" /* or "Send" */);
}