org.oddjob.mail
Class SendMailJob
java.lang.Object
org.oddjob.mail.SendMailJob
- All Implemented Interfaces:
- Runnable
public class SendMailJob
- extends Object
- implements Runnable
Description
Send a mail message.Example
Send a simple message.
<oddjob xmlns:mail="http://rgordon.co.uk/oddjob/mail">
<job>
<mail:send name="Send alert mail" from="${my.alert.from}" to="${my.alert.to}" host="${my.mailhost}" subject="FTP download failed">
Important jobs Failed!
</mail:send>
</job>
</oddjob>
Example
Send attachements. This example rather unimagineatively sends the build
file as two seperate attachements.
<oddjob xmlns:mail="http://rgordon.co.uk/oddjob/mail">
<job>
<mail:send name="Send Attachments" from="${my.alert.from}" to="${my.alert.to}" host="${my.mailhost}" subject="Some Attachements">
<files>
<list>
<values>
<file file="build.xml"/>
<file file="build.xml"/>
</values>
</list>
</files>
</mail:send>
</job>
</oddjob>
- Author:
- rob
SendMailJob
public SendMailJob()
run
public void run()
- Specified by:
run
in interface Runnable
getTo
public String getTo()
setTo
public void setTo(String to)
getSubject
public String getSubject()
setSubject
public void setSubject(String subject)
getHost
public String getHost()
setHost
public void setHost(String host)
getFrom
public String getFrom()
setFrom
public void setFrom(String from)
getMessage
public String getMessage()
setMessage
public void setMessage(String message)
getFiles
public File[] getFiles()
setFiles
public void setFiles(File[] files)
getName
public String getName()
setName
public void setName(String name)
toString
public String toString()
- Overrides:
toString
in class Object