Email
. Each part of the email message can be set individually. Moreover, Email
supports a fluent interface, so even the definition of an e-mail message would look natural.Email
supports plain text, HTML messages, and any combination of both. When the only text or HTML message is set, a simple email will be sent. When both text and HTML message is set, or when attachments are added, a multi-part e-mail will be sent. Actually, Email
supports any number of separate messages to be sent as an email. Here are some examples using fluent interface.[email protected]
John <[email protected]>
EmailAddress
, a class that parses and validates emails per specificationInternetAddress
or just Address
instance.to()
or cc()
multiple times:DataSource
.javax.mail
content type resolution (that might not work for you). You can always attach files as byte or input stream attachment.EmailAttachment
class:content()
method accepts different attachment types.ContentID
set will be considered as inline attachments. However, they also need to be embedded to a certain message, to form a so-called related part of an email. Email clients usually require to have all inline attachments related to some message.