@Service(value="mailSender") public class MailSenderImpl extends Object implements MailSender
| Constructor and Description |
|---|
MailSenderImpl(org.apache.velocity.app.VelocityEngine velocityEngine) |
| Modifier and Type | Method and Description |
|---|---|
void |
send(MailMessage message)
Send the given message.
|
boolean |
testSettings(Map<ApplicationPropertyMailing,String> settings)
Test the given mail-out configuration.
|
boolean |
testSettings(Map<ApplicationPropertyMailing,String> settings,
MailMessage testMessage)
Test the given mail-out configuration and send a test message.
|
void |
updateSettings(Map<ApplicationPropertyMailing,String> settings)
Update the mail-out configuration so that subsequent calls to
MailSender.send(MailMessage) will
use the new settings. |
@Autowired public MailSenderImpl(org.apache.velocity.app.VelocityEngine velocityEngine)
public void send(MailMessage message) throws MailingException
MailSendersend in interface MailSenderMailingException - in case there was an error sending the messagepublic boolean testSettings(Map<ApplicationPropertyMailing,String> settings)
MailSenderMimeMessageSender this
might include a connection test with the server.testSettings in interface MailSendersettings - the settings to testpublic boolean testSettings(Map<ApplicationPropertyMailing,String> settings, MailMessage testMessage)
MailSendertestSettings in interface MailSendersettings - the settings to testtestMessage - the test message to sendpublic void updateSettings(Map<ApplicationPropertyMailing,String> settings) throws ConfigurationUpdateException
MailSenderMailSender.send(MailMessage) will
use the new settings. This method won't test the settings for validity.updateSettings in interface MailSendersettings - the new configurationConfigurationUpdateException - in case the configuration could not be updatedCopyright © 2019 Communote team. All rights reserved.