public class MailInfo
extends java.lang.Object
implements java.io.Serializable
Object used to represent information required to send an email. Can be passed to the
Emailer
to specify more than the typical amount of
information required for an email (i.e. attachments, cc, bcc).
Can also be used to override which email address emails are being sent from. Providing a sender/senderName in this object will override the application-wide from email settings.
Constructor and Description |
---|
MailInfo() |
Modifier and Type | Method and Description |
---|---|
java.util.Collection<MailAttachment> |
getAttachments()
Optional collection of
MailAttachment s to be sent with the email. |
java.util.Collection<java.lang.String> |
getBcc()
Optional collection of email addresses to send as blind carbon copy recipients
|
java.lang.String |
getBody()
Returns the content of the body of the email address to be sent.
|
java.util.Collection<java.lang.String> |
getCc()
Optional collection of email addresses to send as carbon copy recipients
|
java.lang.String |
getMimeType()
Returns the
String representation of the mime type being used for the body of the email to be sent. |
java.lang.String |
getReplyTo()
Returns the optional reply to email address for the email to be sent
|
java.lang.String |
getSender()
Returns the email address of the user sending the email.
|
java.lang.String |
getSenderName()
Returns the name of the user sending the email.
|
java.lang.String |
getSubject()
Returns the subject line for the email to be sent
|
java.util.Collection<java.lang.String> |
getTo()
Returns the collection of email addresses to which the email is to be sent
|
void |
setAttachments(java.util.Collection<MailAttachment> attachments) |
void |
setBcc(java.util.Collection<java.lang.String> bcc) |
void |
setBody(java.lang.String body) |
void |
setCc(java.util.Collection<java.lang.String> cc) |
void |
setMimeType(java.lang.String mimeType) |
void |
setReplyTo(java.lang.String replyTo) |
void |
setSender(java.lang.String sender) |
void |
setSenderName(java.lang.String senderName) |
void |
setSubject(java.lang.String subject) |
void |
setTo(java.util.Collection<java.lang.String> to) |
public java.lang.String getSender()
Returns the email address of the user sending the email. Is optional
when used in conjunction with Emailer.sendEmail(MailInfo)
,
if provided will override the sender from MailSettings
public void setSender(java.lang.String sender)
public java.lang.String getSenderName()
Returns the name of the user sending the email. Is optional
when used in conjunction with Emailer.sendEmail(MailInfo)
,
if provided will override the sender from MailSettings
public void setSenderName(java.lang.String senderName)
public java.util.Collection<MailAttachment> getAttachments()
MailAttachment
s to be sent with the email.public void setAttachments(java.util.Collection<MailAttachment> attachments)
public java.util.Collection<java.lang.String> getBcc()
public void setBcc(java.util.Collection<java.lang.String> bcc)
public java.lang.String getBody()
setMimeType(String)
to specify what kind of content it is.public void setBody(java.lang.String body)
public java.util.Collection<java.lang.String> getCc()
public void setCc(java.util.Collection<java.lang.String> cc)
public java.lang.String getMimeType()
String
representation of the mime type being used for the body of the email to be sent. Defaults to HTML.public void setMimeType(java.lang.String mimeType)
public java.lang.String getReplyTo()
public void setReplyTo(java.lang.String replyTo)
public java.lang.String getSubject()
public void setSubject(java.lang.String subject)
public java.util.Collection<java.lang.String> getTo()
public void setTo(java.util.Collection<java.lang.String> to)