|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.soa.esb.helpers.Email
public class Email
Simplifies sending of e-mails with attachments from java.
The message is sent via a subsequent call to thesendMessage()
method.
ConfigTree
instance:
Field Summary | |
---|---|
static java.lang.String |
ATTACH
ConfigTree attribute : Value of this attribute will be the content of the e-mail's text |
static java.lang.String |
COPYTO
ConfigTree attribute : comma separated list of Copy recipients |
static java.lang.String |
FROM
ConfigTree attribute : will be the contents of the From: field in the outgoing message |
static java.lang.String |
MESSAGE
ConfigTree child Text elements : Each child represents the name of a file to be attached in the outgoing message |
static java.lang.String |
SENDTO
ConfigTree attribute : comma separated list of recipients |
static java.lang.String |
SUBJECT
ConfigTree attribute : will be the contents of the Subject: field in the outgoing message |
Constructor Summary | |
---|---|
Email()
Public constructor. |
Method Summary | |
---|---|
void |
addAttachment(java.io.InputStream is,
java.lang.String attachmentName)
|
java.lang.String[] |
getAttachments()
|
java.lang.String |
getCopyTo()
|
java.lang.String |
getFrom()
|
javax.mail.internet.MimeMessage |
getMailMessage()
Get the mail message associated with this EsbMail
instance. |
java.lang.String |
getMessage()
|
java.lang.String |
getSendTo()
|
java.lang.String |
getSubject()
|
void |
sendMessage()
Send the mail message associated with this instance. |
void |
setAttachments(java.lang.String[] attachments)
|
void |
setCopyTo(java.lang.String copyTo)
|
void |
setFrom(java.lang.String from)
|
void |
setMessage(java.lang.String message)
|
void |
setSendTo(java.lang.String sendTo)
|
void |
setSubject(java.lang.String subject)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String FROM
public static final java.lang.String SENDTO
public static final java.lang.String COPYTO
public static final java.lang.String SUBJECT
public static final java.lang.String ATTACH
public static final java.lang.String MESSAGE
Constructor Detail |
---|
public Email() throws javax.mail.internet.AddressException, javax.mail.MessagingException
sendMessage()
method.
javax.mail.MessagingException
javax.mail.internet.AddressException
ConfigTree
Method Detail |
---|
public void sendMessage() throws javax.mail.MessagingException
javax.mail.MessagingException
- Unable to transport the message associated with this
Email instance.public javax.mail.internet.MimeMessage getMailMessage() throws javax.mail.MessagingException
mail message
associated with this EsbMail
instance.
javax.mail.MessagingException
public java.lang.String[] getAttachments()
public void setAttachments(java.lang.String[] attachments)
attachments
- The attachments to set.public void addAttachment(java.io.InputStream is, java.lang.String attachmentName) throws javax.mail.MessagingException, java.io.IOException
is
- the InputStream containing the attachment to setattachmentName
- the filename of the attachment in the mail
javax.mail.MessagingException
java.io.IOException
public java.lang.String getCopyTo()
public void setCopyTo(java.lang.String copyTo)
copyTo
- The copyTo to set.public java.lang.String getFrom()
public void setFrom(java.lang.String from)
from
- The from to set.public java.lang.String getSendTo()
public void setSendTo(java.lang.String sendTo)
sendTo
- The sendTo to set.public java.lang.String getSubject()
public void setSubject(java.lang.String subject)
subject
- The subject to set.public java.lang.String getMessage()
public void setMessage(java.lang.String message)
message
- The message to set.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |