| Modifier and Type | Class and Description |
|---|---|
protected static class |
SendMailJob.MailInfo |
| Modifier and Type | Field and Description |
|---|---|
static String |
PROP_CC_RECIPIENT
The e-mail address to cc the mail to.
|
static String |
PROP_CONTENT_TYPE
The message content type.
|
static String |
PROP_MESSAGE
The e-mail message body.
|
static String |
PROP_PASSWORD
Password for authenticated session.
|
static String |
PROP_RECIPIENT
The e-mail address to send the mail to.
|
static String |
PROP_REPLY_TO
The e-mail address the message should say to reply to.
|
static String |
PROP_SENDER
The e-mail address to claim the mail is from.
|
static String |
PROP_SMTP_HOST
The host name of the smtp server.
|
static String |
PROP_SUBJECT
The subject to place on the e-mail.
|
static String |
PROP_USERNAME
Username for authenticated session.
|
| Constructor and Description |
|---|
SendMailJob() |
| Modifier and Type | Method and Description |
|---|---|
protected SendMailJob.MailInfo |
createMailInfo() |
void |
execute(JobExecutionContext context)
|
protected org.slf4j.Logger |
getLog() |
protected Session |
getMailSession(SendMailJob.MailInfo mailInfo) |
protected String |
getOptionalParm(JobDataMap data,
String property) |
protected String |
getRequiredParm(JobDataMap data,
String property,
String constantName) |
protected SendMailJob.MailInfo |
populateMailInfo(JobDataMap data,
SendMailJob.MailInfo mailInfo) |
protected MimeMessage |
prepareMimeMessage(SendMailJob.MailInfo mailInfo) |
protected void |
setMimeMessageContent(MimeMessage mimeMessage,
SendMailJob.MailInfo mailInfo) |
public static final String PROP_SMTP_HOST
public static final String PROP_RECIPIENT
public static final String PROP_CC_RECIPIENT
public static final String PROP_SENDER
public static final String PROP_REPLY_TO
public static final String PROP_SUBJECT
public static final String PROP_MESSAGE
public static final String PROP_CONTENT_TYPE
public static final String PROP_USERNAME
public static final String PROP_PASSWORD
public void execute(JobExecutionContext context) throws JobExecutionException
Job
Called by the when a Scheduler
fires that is associated with the TriggerJob.
The implementation may wish to set a
result object on the
JobExecutionContext before this method exits. The result itself
is meaningless to Quartz, but may be informative to
or
JobListeners that are watching the job's
execution.
TriggerListeners
execute in interface JobJobExecutionException - if there is an exception while executing the job.Job.execute(org.quartz.JobExecutionContext)protected org.slf4j.Logger getLog()
protected MimeMessage prepareMimeMessage(SendMailJob.MailInfo mailInfo) throws MessagingException
MessagingExceptionprotected void setMimeMessageContent(MimeMessage mimeMessage,
SendMailJob.MailInfo mailInfo)
throws MessagingException
MessagingExceptionprotected Session getMailSession(SendMailJob.MailInfo mailInfo) throws MessagingException
MessagingExceptionprotected SendMailJob.MailInfo createMailInfo()
protected SendMailJob.MailInfo populateMailInfo(JobDataMap data, SendMailJob.MailInfo mailInfo)
protected String getRequiredParm(JobDataMap data, String property, String constantName)
protected String getOptionalParm(JobDataMap data, String property)
Copyright 2001-2019, Terracotta, Inc.