Package com.atlassian.crowd.manager.mail
Interface MailManager
- All Superinterfaces:
MailConfigurationService
- All Known Implementing Classes:
MailManagerImpl
-
Method Summary
Modifier and TypeMethodDescriptionvoid
sendEmail
(EmailMessage messageToSend) Sends a single email using the configured mail serverCollection
<? extends EmailMessage> sendEmails
(Collection<? extends EmailMessage> messagesToSend) Sends multiple emails using the configured mail server.sendTestMail
(SMTPServer smtpServer, jakarta.mail.internet.InternetAddress emailAddress) Send a test email using the supplied mail server (remote host / JNDI)validateConfiguration
(MailConfiguration mailConfiguration) Verifies whether the specified MailConfiguration is validMethods inherited from interface com.atlassian.crowd.manager.mail.MailConfigurationService
getMailConfiguration, isConfigured, saveConfiguration
-
Method Details
-
sendTestMail
SendTestMailResult sendTestMail(SMTPServer smtpServer, jakarta.mail.internet.InternetAddress emailAddress) throws MailSendException Send a test email using the supplied mail server (remote host / JNDI)- Parameters:
smtpServer
- supplied SMTP Server, which will be used to send message.emailAddress
- address of recipient.- Returns:
- result of test, which contains logs and status.
- Throws:
MailSendException
- an error occurred sending the email.- Since:
- 3.2
-
sendEmails
Collection<? extends EmailMessage> sendEmails(Collection<? extends EmailMessage> messagesToSend) throws MailSendException Sends multiple emails using the configured mail server.- Returns:
- a collection of messages that failed to be sent
- Throws:
MailSendException
- an error occurred that prevented sending any email (connection error, configuration error, etc.).- Since:
- 3.3
-
sendEmail
Sends a single email using the configured mail server- Parameters:
messageToSend
- single email using the configured mail server- Throws:
MailSendException
- an error occurred sending the email.- Since:
- 4.4.0
-
validateConfiguration
Verifies whether the specified MailConfiguration is valid- Parameters:
mailConfiguration
- entity with attributes to be validated- Returns:
- a list with errors found in the configuration
- Since:
- 3.2
-