Package io.goobi.viewer.model.email
Class EMailSender
java.lang.Object
io.goobi.viewer.model.email.EMailSender
-
Constructor Summary
ConstructorsConstructorDescriptionEMailSender(Configuration config) EMailSender(String smtpServer, String smtpUser, String smtpPassword, String smtpSenderAddress, String smtpSenderName, String smtpSecurity, Integer smtpPort) -
Method Summary
-
Constructor Details
-
EMailSender
public EMailSender() -
EMailSender
- Parameters:
config-
-
EMailSender
public EMailSender(String smtpServer, String smtpUser, String smtpPassword, String smtpSenderAddress, String smtpSenderName, String smtpSecurity, Integer smtpPort) - Parameters:
smtpServer-smtpUser-smtpPassword-smtpSenderAddress-smtpSenderName-smtpSecurity-smtpPort-
-
-
Method Details
-
postMail
public boolean postMail(List<String> recipients, List<String> cc, List<String> bcc, List<String> replyTo, String subject, String body) throws jakarta.mail.MessagingException, UnsupportedEncodingException Sends an email to with the given subject and body to the given recipient list using the given SMTP parameters.- Parameters:
recipients-cc-bcc-replyTo-subject-body-- Returns:
- true if mail sent successfully; false otherwise
- Throws:
jakarta.mail.MessagingExceptionUnsupportedEncodingException
-