Interface MailFactory
- All Known Implementing Classes:
MailFactoryImpl
public interface MailFactory
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addMailListener
(Mail.MailListener listener) createLocalizedMailFromTemplate
(EmailTemplate template, Locale locale) createLocalizedMailFromTemplate
(EmailTemplate template, Locale locale, MailProvider mailProvider) creates a mail using all non empty values from the given templateEntity
and with the givenLocale
using a specificMailProvider
createMail
(String subject) creates an empty mail with the given subjectcreateMail
(String subject, MailProvider mailProvider) creates an empty mail with the given subject using a specificMailProvider
createMailFromTemplate
(EmailTemplate template) creates a mail using all non empty values from the given template Note: this method creates the mail using the current localecreateMailFromTemplate
(EmailTemplate template, MailProvider mailProvider) creates a mail using all non empty values from the given template using a specificMailProvider
Note: this method creates the mail using the current localevoid
removeMailListener
(Mail.MailListener listener)
-
Method Details
-
createMail
creates an empty mail with the given subject -
createMail
creates an empty mail with the given subject using a specificMailProvider
-
createMailFromTemplate
Mail createMailFromTemplate(EmailTemplate template) throws UnsupportedEncodingException, PersistException, jakarta.mail.internet.AddressException creates a mail using all non empty values from the given template Note: this method creates the mail using the current locale- Throws:
UnsupportedEncodingException
PersistException
jakarta.mail.internet.AddressException
-
createMailFromTemplate
Mail createMailFromTemplate(EmailTemplate template, MailProvider mailProvider) throws UnsupportedEncodingException, PersistException, jakarta.mail.internet.AddressException creates a mail using all non empty values from the given template using a specificMailProvider
Note: this method creates the mail using the current locale- Throws:
UnsupportedEncodingException
PersistException
jakarta.mail.internet.AddressException
-
createLocalizedMailFromTemplate
-
createLocalizedMailFromTemplate
Mail createLocalizedMailFromTemplate(EmailTemplate template, Locale locale, MailProvider mailProvider) creates a mail using all non empty values from the given templateEntity
and with the givenLocale
using a specificMailProvider
-
addMailListener
-
removeMailListener
-