public interface MailHandler
| Modifier and Type | Method and Description |
|---|---|
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 destination user
|
Pair<java.lang.String,java.lang.String> |
resolveFromNameAndAddress(BasicUser from,
BasicUser to,
MailContext context)
Returns the name and address (in this order) that will be used in the mail.
|
void |
send(BasicUser from,
BasicUser to,
java.lang.String subject,
java.lang.String body)
Calls the method
#send(BasicUser, BasicUser, String, String, boolean) with the forwardInternalMessage in
false. |
void |
send(BasicUser from,
BasicUser to,
java.lang.String subject,
java.lang.String body,
MailContext context)
Creates a new mail pending to be sent by
MailProcessingPollingTask.If context is FORWARD_INTERNAL_MESSAGE: The "From name" of the message will be the name of the given from user The "From address" of the message will be the one declared in the configuration of the given from user. The "Reply-to address" of the message will be the address of the given from user. If context is NEW_EMAIL_VALIDATION: The "To address" will be the new email |
void |
send(java.lang.String fromName,
java.lang.String fromEmail,
java.lang.String toName,
java.lang.String toEmail,
java.lang.String subject,
java.lang.String body)
Sends a new mail with the given information.
|
org.springframework.mail.javamail.JavaMailSender getMailSender()
org.springframework.mail.javamail.JavaMailSender getMailSender(Configuration configuration)
Pair<java.lang.String,java.lang.String> resolveFromNameAndAddress(BasicUser from, BasicUser to, MailContext context)
void send(BasicUser from, BasicUser to, java.lang.String subject, java.lang.String body)
#send(BasicUser, BasicUser, String, String, boolean) with the forwardInternalMessage in
false.void send(BasicUser from, BasicUser to, java.lang.String subject, java.lang.String body, MailContext context)
MailProcessingPollingTask.void send(java.lang.String fromName,
java.lang.String fromEmail,
java.lang.String toName,
java.lang.String toEmail,
java.lang.String subject,
java.lang.String body)
fromName - Name of the sender.fromEmail - Email of the sender, if null it is assumed to be the system.toName - Name of the receiver.toEmail - Email of the receiver.subject - Subject of the mailbody - Body of the mail