Interface MailFactory
- All Known Implementing Classes:
MailFactoryImpl
public interface MailFactory
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddMailListener(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 templateEntityand with the givenLocaleusing a specificMailProvidercreateMail(String subject) creates an empty mail with the given subjectcreateMail(String subject, MailProvider mailProvider) creates an empty mail with the given subject using a specificMailProvidercreateMailFromTemplate(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 specificMailProviderNote: this method creates the mail using the current localevoidremoveMailListener(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:
UnsupportedEncodingExceptionPersistExceptionjakarta.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 specificMailProviderNote: this method creates the mail using the current locale- Throws:
UnsupportedEncodingExceptionPersistExceptionjakarta.mail.internet.AddressException
-
createLocalizedMailFromTemplate
-
createLocalizedMailFromTemplate
Mail createLocalizedMailFromTemplate(EmailTemplate template, Locale locale, MailProvider mailProvider) creates a mail using all non empty values from the given templateEntityand with the givenLocaleusing a specificMailProvider -
addMailListener
-
removeMailListener
-