@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
MailSender
send
in interface MailSender
MailingException
- in case there was an error sending the messagepublic boolean testSettings(Map<ApplicationPropertyMailing,String> settings)
MailSender
MimeMessageSender
this
might include a connection test with the server.testSettings
in interface MailSender
settings
- the settings to testpublic boolean testSettings(Map<ApplicationPropertyMailing,String> settings, MailMessage testMessage)
MailSender
testSettings
in interface MailSender
settings
- the settings to testtestMessage
- the test message to sendpublic void updateSettings(Map<ApplicationPropertyMailing,String> settings) throws ConfigurationUpdateException
MailSender
MailSender.send(MailMessage)
will
use the new settings. This method won't test the settings for validity.updateSettings
in interface MailSender
settings
- the new configurationConfigurationUpdateException
- in case the configuration could not be updatedCopyright © 2019 Communote team. All rights reserved.