public class Mailer extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
PROPERTY_KEY_SMTP
The Constant PROPERTY_KEY_SMTP.
|
| Constructor and Description |
|---|
Mailer()
Instantiates a new mailer.
|
Mailer(String from)
Instantiates a new mailer.
|
Mailer(String from,
String smtp)
Instantiates a new mailer.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getDefaultTo()
Gets the default to.
|
String |
getFrom()
Gets the from.
|
String |
getSmtp()
Gets the smtp.
|
String |
getSubjectPrefix()
Gets the subject prefix.
|
void |
send(MailMessage mailMessage)
Send.
|
void |
setDefaultTo(String defaultTo)
Sets the default to.
|
void |
setFrom(String from)
Sets the from.
|
void |
setSmtp(String smtp)
Sets the smtp.
|
void |
setSubjectPrefix(String subjectPrefix)
Sets the subject prefix.
|
public static final String PROPERTY_KEY_SMTP
public Mailer()
public Mailer(String from)
from - the frompublic String getFrom()
public String getSmtp()
public void setFrom(String from)
from - the new frompublic void setSmtp(String smtp)
smtp - the new smtppublic String getDefaultTo()
@Value(value="${psiprobe.tools.mail.to}")
public void setDefaultTo(String defaultTo)
defaultTo - the new default topublic String getSubjectPrefix()
@Value(value="${psiprobe.tools.mail.subjectPrefix}")
public void setSubjectPrefix(String subjectPrefix)
subjectPrefix - the new subject prefixpublic void send(MailMessage mailMessage) throws javax.mail.MessagingException
mailMessage - the mail messagejavax.mail.MessagingException - the messaging exceptionCopyright © 2009–2020 psi-probe. All rights reserved.