public interface MailHandler
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
applyTemplate(org.cyclos.impl.utils.notifications.ApplyMailTemplateParams params)
Applies the configured e-mail template.
|
org.springframework.mail.javamail.JavaMailSender |
getMailSender()
Returns a JavaMailSender for the current configuration
|
org.springframework.mail.javamail.JavaMailSender |
getMailSender(Configuration configuration)
Returns a JavaMailSender for the given configuration
|
void |
send(BasicUser from,
BasicUser to,
org.cyclos.impl.utils.notifications.MailContentProducer producer)
Calls the method
send(BasicUser, BasicUser, MailContext, MailContentProducer) passing null as
MailContext |
void |
send(BasicUser from,
BasicUser to,
MailContext context,
org.cyclos.impl.utils.notifications.MailContentProducer producer)
Creates a new mail pending to be sent by
MailProcessingPollingTask. |
void |
send(java.lang.String toName,
java.lang.String toEmail,
java.lang.String subject,
java.lang.String body)
Sends a new mail with the given information.
|
java.lang.String applyTemplate(org.cyclos.impl.utils.notifications.ApplyMailTemplateParams params)
{name} are replaced.
All profile field variables are supported (see ProfileFieldHandler#getProfileFieldVariables(BasicUser)),
plus others, such as: subject, message, salutation,
unsubscribe, applicationName, date, dateTime,
day, month and year.org.springframework.mail.javamail.JavaMailSender getMailSender()
org.springframework.mail.javamail.JavaMailSender getMailSender(Configuration configuration)
void send(BasicUser from, BasicUser to, org.cyclos.impl.utils.notifications.MailContentProducer producer)
send(BasicUser, BasicUser, MailContext, MailContentProducer) passing null as
MailContextvoid send(BasicUser from, BasicUser to, MailContext context, org.cyclos.impl.utils.notifications.MailContentProducer producer)
MailProcessingPollingTask.void send(java.lang.String toName,
java.lang.String toEmail,
java.lang.String subject,
java.lang.String body)
toName - Name of the receiver.toEmail - Email of the receiver.subject - Subject of the mailbody - Body of the mail