org.quartz.jobs.ee.mail
Class SendMailJob

java.lang.Object
  extended byorg.quartz.jobs.ee.mail.SendMailJob
All Implemented Interfaces:
Job

public class SendMailJob
extends Object
implements Job

A Job which sends an e-mail with the configured content to the configured recipient.

Author:
James House

Field Summary
static String PROP_CC_RECIPIENT
          The e-mail address to cc the mail to.
static String PROP_MESSAGE
          The e-mail message body.
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.
 
Constructor Summary
SendMailJob()
           
 
Method Summary
 void execute(JobExecutionContext context)
           Called by the Scheduler when a Trigger fires that is associated with the Job.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_SMTP_HOST

public static final String PROP_SMTP_HOST
The host name of the smtp server. REQUIRED.

See Also:
Constant Field Values

PROP_RECIPIENT

public static final String PROP_RECIPIENT
The e-mail address to send the mail to. REQUIRED.

See Also:
Constant Field Values

PROP_CC_RECIPIENT

public static final String PROP_CC_RECIPIENT
The e-mail address to cc the mail to. Optional.

See Also:
Constant Field Values

PROP_SENDER

public static final String PROP_SENDER
The e-mail address to claim the mail is from. REQUIRED.

See Also:
Constant Field Values

PROP_REPLY_TO

public static final String PROP_REPLY_TO
The e-mail address the message should say to reply to. Optional.

See Also:
Constant Field Values

PROP_SUBJECT

public static final String PROP_SUBJECT
The subject to place on the e-mail. REQUIRED.

See Also:
Constant Field Values

PROP_MESSAGE

public static final String PROP_MESSAGE
The e-mail message body. REQUIRED.

See Also:
Constant Field Values
Constructor Detail

SendMailJob

public SendMailJob()
Method Detail

execute

public void execute(JobExecutionContext context)
             throws JobExecutionException
Description copied from interface: Job

Called by the Scheduler when a Trigger fires that is associated with the Job.

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 JobListeners or TriggerListeners that are watching the job's execution.

Specified by:
execute in interface Job
Returns:
void (nothing) if job is successful.
Throws:
JobExecutionException - if there is an exception while executing the job.
See Also:
Job.execute(org.quartz.JobExecutionContext)

Quartz Enterprise Job Scheduler Project Page