public class MailMessage extends Object
| Constructor and Description |
|---|
MailMessage(String to,
String subject,
String body)
Instantiates a new mail message.
|
| Modifier and Type | Method and Description |
|---|---|
MailMessage |
addAttachment(DataSource attachment)
Adds the attachment.
|
MailMessage |
addAttachment(File attachment)
Adds the attachment.
|
MailMessage |
addRecipientBcc(String address)
Adds the recipient bcc.
|
MailMessage |
addRecipientCc(String address)
Adds the recipient cc.
|
MailMessage |
addRecipientTo(String address)
Adds the recipient to.
|
MailMessage |
clearAttachments()
Clear attachments.
|
MailMessage |
clearRecipientsBcc()
Clear recipients bcc.
|
MailMessage |
clearRecipientsCc()
Clear recipients cc.
|
MailMessage |
clearRecipientsTo()
Clear recipients to.
|
protected List<DataSource> |
getAttachments()
Gets the attachments.
|
DataSource[] |
getAttachmentsArray()
Gets the attachments array.
|
protected List<String> |
getBcc()
Gets the bcc.
|
String[] |
getBccArray()
Gets the bcc array.
|
String |
getBody()
Gets the body.
|
protected List<String> |
getCc()
Gets the cc.
|
String[] |
getCcArray()
Gets the cc array.
|
String |
getSubject()
Gets the subject.
|
protected List<String> |
getTo()
Gets the to.
|
String[] |
getToArray()
Gets the to array.
|
boolean |
isBodyHtml()
Checks if is body html.
|
MailMessage |
setBody(String body)
Sets the body.
|
MailMessage |
setBodyHtml(boolean bodyHtml)
Sets the body html.
|
MailMessage |
setSubject(String subject)
Sets the subject.
|
public String[] getToArray()
public String[] getCcArray()
public String[] getBccArray()
public DataSource[] getAttachmentsArray()
public String getSubject()
public String getBody()
public boolean isBodyHtml()
public MailMessage addRecipientTo(String address)
address - the addresspublic MailMessage addRecipientCc(String address)
address - the addresspublic MailMessage addRecipientBcc(String address)
address - the addresspublic MailMessage addAttachment(File attachment)
attachment - the attachmentpublic MailMessage addAttachment(DataSource attachment)
attachment - the attachmentpublic MailMessage clearRecipientsTo()
public MailMessage clearRecipientsCc()
public MailMessage clearRecipientsBcc()
public MailMessage clearAttachments()
public MailMessage setSubject(String subject)
subject - the subjectpublic MailMessage setBody(String body)
body - the bodypublic MailMessage setBodyHtml(boolean bodyHtml)
bodyHtml - the body htmlprotected List<DataSource> getAttachments()
Copyright © 2009–2020 psi-probe. All rights reserved.