public interface MailService
Modifier and Type | Method and Description |
---|---|
java.util.List<Address> |
getEmailList(java.util.List<User> users) |
InternetAddress |
getMailFrom(User user,
java.util.Optional<EmailDatasink> datasink) |
SimpleMail |
newSimpleMail()
Creates and returns a new instance of
SimpleMail |
SimpleMail |
newSimpleMail(java.util.Optional<EmailDatasink> emailDatasink) |
SimpleMail |
newTemplateMail(MailTemplate template,
SimpleAttachment... attachments)
Creates and returns a new instance of
SimpleMail configured with the
given template |
SimpleMail |
newTemplateMail(java.util.Optional<EmailDatasink> emailDatasink,
MailTemplate template,
SimpleAttachment... attachments) |
void |
sendMail(MimeMessage message)
Spawns a new worker which then sends the message
|
void |
sendMail(MimeMessage message,
MailServiceImpl.MailSupervisor supervisor) |
void |
sendMail(java.util.Optional<EmailDatasink> emailDatasink,
MimeMessage message) |
void |
sendMail(java.util.Optional<EmailDatasink> emailDatasink,
MimeMessage message,
MailServiceImpl.MailSupervisor supervisor) |
void |
sendMailSync(MimeMessage message)
Sends a mail synchronously
|
void |
sendMailSync(MimeMessage message,
MailServiceImpl.MailSupervisor supervisor) |
void |
sendMailSync(java.util.Optional<EmailDatasink> emailDatasink,
MimeMessage message) |
void |
sendMailSync(java.util.Optional<EmailDatasink> emailDatasink,
MimeMessage message,
MailServiceImpl.MailSupervisor supervisor) |
SimpleMail newSimpleMail()
SimpleMail
SimpleCryptoMail
, else a new instance of SimpleMail
SimpleMail newSimpleMail(java.util.Optional<EmailDatasink> emailDatasink)
SimpleMail newTemplateMail(MailTemplate template, SimpleAttachment... attachments)
SimpleMail
configured with the
given templatetemplate
- The MailTemplate
to useSimpleMail
using the given
MailTemplate
SimpleMail newTemplateMail(java.util.Optional<EmailDatasink> emailDatasink, MailTemplate template, SimpleAttachment... attachments)
void sendMail(MimeMessage message)
message
- The MimeMessage
to sendvoid sendMail(java.util.Optional<EmailDatasink> emailDatasink, MimeMessage message)
void sendMailSync(MimeMessage message)
message
- The MimeMessage
to sendvoid sendMailSync(java.util.Optional<EmailDatasink> emailDatasink, MimeMessage message)
void sendMailSync(MimeMessage message, MailServiceImpl.MailSupervisor supervisor)
void sendMailSync(java.util.Optional<EmailDatasink> emailDatasink, MimeMessage message, MailServiceImpl.MailSupervisor supervisor)
void sendMail(MimeMessage message, MailServiceImpl.MailSupervisor supervisor)
void sendMail(java.util.Optional<EmailDatasink> emailDatasink, MimeMessage message, MailServiceImpl.MailSupervisor supervisor)
java.util.List<Address> getEmailList(java.util.List<User> users) throws AddressException
AddressException
InternetAddress getMailFrom(User user, java.util.Optional<EmailDatasink> datasink)