HI I'm trying to create Outlook e-mail from Java I'm working with Windows 10 and Outlook 365 desktop version I'm able to do it with AposeEmail https://docs.aspose.com/email/#asposeemail-for-java and with jotlmsg https://github.com/ctabin/jotlmsg But there are limitations. Apose E-mial is not free. Only evaluation version is free. Jotlmsg doesn't support html e-mails. There’s also another possibility to use methods from dynamic libraries. There is library Jacob for this Jacob Outlook example
However I don't know how to find way to do it in Jacob. Examples which I found on Stackoverflow or in other places doesn't work.
I have following VBA code which works. Any idea how to do the same / similar thing in Jacob? Alternative solution. Do you know free JAVA library which supports .msg e-mail with HTML format?
Public Sub CreateEmail()
Dim objMsg As MailItem
Set objMsg = Application.CreateItem(olMailItem)
With objMsg
.To = Alias@domain.com
.CC = Alias2@domain.com
.BCC = Alias3@domain.com
.Subject = "This is the subject"
.Categories = "Test"
.VotingOptions = "Yes;No;Maybe;"
.BodyFormat = olFormatPlain ' send plain text message
.Importance = olImportanceHigh
.Sensitivity = olConfidential
.Attachments.Add ("path-to-file.docx")
' Calculate a date using DateAdd or enter an explicit date
.ExpiryTime = DateAdd("m", 6, Now) '6 months from now
.DeferredDeliveryTime = #8/1/2012 6:00:00 PM#
.Display
End With
Set objMsg = Nothing
End Sub
I tried AposeE-mail and Jotlmsg but they don't satisfy fully my needs.