2

i would like to create a new email with Java respectively open the "New eMail" window from Outlook and insert some data (like CC, Body..)

I tried the SWT OLE Library, but that is a problem because i have a pure javafx8 application next try was with

getHostServices().showDocument("mailto:a@b.c")

this works, but i can't format the text with html

Next try was the Desktop Class but same problem like getHostServices, no html formatted emails.

Some ideas ?

Garog
  • 315
  • 1
  • 5
  • 15

1 Answers1

2

Outlook is a COM server which you can automate using the OLE COM technology. I don't use Java for developing, but I hope you will find how to call the COM servers in Java, for example - Is there OLE Automation in Java?. See Using Automation to Send a Microsoft Outlook Message. It shows you how to use Automation to create and send a Microsoft Outlook message.

Also you may find the How to automate Outlook from another program article helpful.

Community
  • 1
  • 1
Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45