Class Mail
java.lang.Object
dev.voidframework.sendmail.entity.Mail
A single mail.
- Since:
- 1.7.0
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAttachment(String name, InputStream inputStream) Adds an attachment.voidaddBlindCarbonCopyRecipient(String blindCarbonCopyRecipient) Adds blind carbon copy recipient.voidaddCarbonCopyRecipient(String carbonCopyRecipient) Adds carbon copy recipient.voidaddRecipient(String recipient) Adds recipient.Gets all attachments.Gets all blind carbon copy recipients.Gets the HTML body content.Gets the TEXT body content.Gets all carbon copy recipients.Gets the defined charset.Gets the sender address.Gets the sender name.Gets all recipients.Gets the destination to use in case recipient choose to reply to your mail.Gets the subject.voidsetBodyContentHtml(String bodyContentHtml) Sets the HTML body content.voidsetBodyContentText(String bodyContentText) Sets the TEXT body content.voidsetCharset(Charset charset) Sets the mail charset.voidSets the sender (aka.voidSets the sender (aka.voidsetReplyTo(String replyTo) Sets the destination to use in case recipient choose to reply to your mail.voidsetSubject(String subject) Sets the subject.
-
Constructor Details
-
Mail
public Mail()Build a new instance.- Since:
- 1.7.0
-
-
Method Details
-
getCharset
Gets the defined charset.- Returns:
- The charset defined in this mail
- Since:
- 1.7.0
-
setCharset
Sets the mail charset.- Parameters:
charset- The charset defined in this mail- Since:
- 1.7.0
-
getSubject
Gets the subject.- Returns:
- The subject of this mail
- Since:
- 1.7.0
-
setSubject
Sets the subject.- Parameters:
subject- The subject to set- Since:
- 1.7.0
-
getBodyContentHtml
Gets the HTML body content.- Returns:
- The HTML body content
- Since:
- 1.7.0
-
setBodyContentHtml
Sets the HTML body content.- Parameters:
bodyContentHtml- The HTML body content- Since:
- 1.7.0
-
getBodyContentText
Gets the TEXT body content.- Returns:
- The TEXT body content
- Since:
- 1.7.0
-
setBodyContentText
Sets the TEXT body content.- Parameters:
bodyContentText- The TEXT body content- Since:
- 1.7.0
-
getFromAddress
Gets the sender address.- Returns:
- The sender address
- Since:
- 1.7.0
-
getFromName
Gets the sender name.- Returns:
- The sender name
- Since:
- 1.7.0
-
setFrom
Sets the sender (aka. From).- Parameters:
address- The sender address- Since:
- 1.7.0
-
setFrom
Sets the sender (aka. From).- Parameters:
address- The sender addressname- The sender name- Since:
- 1.7.0
-
getReplyTo
Gets the destination to use in case recipient choose to reply to your mail.- Returns:
- The destination to use as "reply-to"
- Since:
- 1.7.0
-
setReplyTo
Sets the destination to use in case recipient choose to reply to your mail.- Parameters:
replyTo- The destination to use as "reply-to"- Since:
- 1.7.0
-
getRecipients
Gets all recipients.- Returns:
- A set of recipients
- Since:
- 1.7.0
-
addRecipient
Adds recipient.- Parameters:
recipient- Recipient to add- Since:
- 1.7.0
-
getCarbonCopyRecipients
Gets all carbon copy recipients.- Returns:
- A set of carbon copy recipients
- Since:
- 1.7.0
-
addCarbonCopyRecipient
Adds carbon copy recipient.- Parameters:
carbonCopyRecipient- Carbon copy recipient to add- Since:
- 1.7.0
-
getBlindCarbonCopyRecipients
Gets all blind carbon copy recipients.- Returns:
- A set of blind carbon copy recipients
- Since:
- 1.7.0
-
addBlindCarbonCopyRecipient
Adds blind carbon copy recipient.- Parameters:
blindCarbonCopyRecipient- Blind carbon copy recipient to add- Since:
- 1.7.0
-
getAttachmentList
Gets all attachments.- Returns:
- A list of attachments
- Since:
- 1.7.0
-
addAttachment
Adds an attachment.- Parameters:
name- Name of the attachment (aka filename)inputStream- Attachment content- Since:
- 1.7.0
-