Creates a Java object javax.mail.internet.MimeMessage from the configured settings
Use this method if you want to use the Mail object to compose an E-Mail but need to do some custom operations on it which you are unable to do on the Mail object itself. You can first add all neccessary data to the Mail object and then, instead of sending it, call this method to get the native Java mail object on which you can perform a variety off additional operations. See the Java-Mail API Reference for details.
After you modified the MimeMessage object you can again use the Mail object to send it using them method mail.send with is as parameter.
Java object of type javax.mail.internet.MimeMessage representing the preconfigured mail
|Allowed in script types||
This example first creates a mail via the Mail object and fills it with basic data. Then it uses the prepareMessage() object to create the corresponding Java-Mail API object. On this object it is possible to set the "Content-ID", a property that can be used to provide an unique identifier for the content of this mail. Finally the message object is sent.
var mail = createMail();