org.enableit.tools.email.interfaces
Class EmailConfigBean
java.lang.Object
|
+--org.enableit.tools.email.interfaces.EmailConfigBean
- All Implemented Interfaces:
- java.io.Serializable
- public class EmailConfigBean
- extends java.lang.Object
- implements java.io.Serializable
A JavaBean encapsulating the configuration of an email to be
sent.
- Author:
- Tim Stephenson
- See Also:
- Serialized Form
|
Constructor Summary |
EmailConfigBean()
Default constructor. |
EmailConfigBean(java.lang.String to,
java.lang.String from,
java.lang.String subject,
java.lang.String message)
Constructor setting the basics (but not attachments) in one go. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EmailConfigBean
public EmailConfigBean()
- Default constructor.
EmailConfigBean
public EmailConfigBean(java.lang.String to,
java.lang.String from,
java.lang.String subject,
java.lang.String message)
- Constructor setting the basics (but not attachments) in one go.
- Parameters:
to - Target email address(es). If more than one use comma to
separate.from - Message 'from' address. If supplied this overrides the
default in the JNDI context.subject - Subject for the mail message.message - Body text for the mail message.
getTo
public java.lang.String getTo()
- Returns:
String of the 'to' email addresses, comma-separated
setTo
public void setTo(java.lang.String newTo)
- Parameters:
newTo - String of the 'to' email addresses
addTo
public void addTo(java.lang.String toAddress)
- Adds a new addressee.
- Parameters:
toAddress - Extra email address to add.
getSubject
public java.lang.String getSubject()
- Returns:
- Subject for the email
setSubject
public void setSubject(java.lang.String newSubject)
- Parameters:
newSubject - Subject for the email
getMessage
public java.lang.String getMessage()
- Returns:
- Text for the message body
setMessage
public void setMessage(java.lang.String newMessage)
- Parameters:
newMessage - Text for the message body
getFrom
public java.lang.String getFrom()
- Returns:
- The From address for the email.
setFrom
public void setFrom(java.lang.String newFrom)
- Parameters:
newFrom - The From address for the email.
getAttachmentList
public java.util.List getAttachmentList()
- Returns:
List of either Objects or
java.net.URLs to send to the 'to' email addresses
as attachments.
addAttachment
public void addAttachment(Attachment attachment)
- Adds a new attachment.
- Parameters:
attachment - The Attachment to add to the
list for sending.
Copyright © 1999-2003 enableIT.org. All Rights Reserved.