Class MailMessage
java.lang.Object
com.aquima.interactions.foundation.connectivity.impl.MailMessage
- All Implemented Interfaces:
IMailMessage
- Direct Known Subclasses:
HtmlMailMessage
,TextMailMessage
This abstract class can be used for standard email messages, it does not (yet) support attachments.
- Since:
- 6.4
- Author:
- Jon van Leuven
-
Constructor Summary
ConstructorsConstructorDescriptionMailMessage
(IMailAddress sender, IMailAddress[] recipients, IMailAddress[] carbonCopyRecipients, IMailAddress[] blindCarbonCopyRecipients, IMailMessageAttachment[] attachments, String subject, String body) Create a fully specified email message.MailMessage
(IMailAddress sender, IMailAddress recipient, String subject, String body) Create a basic email message with a sender, one recipient, a subject and a body. -
Method Summary
Modifier and TypeMethodDescriptionThis method returns the mail attachments.getBcc()
This method returns the recipient addresses that receive a bcc (blind carbon copy) message.getBody()
This method returns the body of the message.getCc()
This method returns the recipient addresses that receive a cc (carbon copy) message.getFrom()
This method returns the sender's address.This method returns the subject of the message.getTo()
This method returns the recipient addresses.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.aquima.interactions.foundation.connectivity.IMailMessage
getContentType
-
Constructor Details
-
MailMessage
Create a basic email message with a sender, one recipient, a subject and a body.- Parameters:
sender
- The sender, may not be nullrecipient
- The recipient, may not be nullsubject
- The subject, may be nullbody
- The body of the message, may be null
-
MailMessage
public MailMessage(IMailAddress sender, IMailAddress[] recipients, IMailAddress[] carbonCopyRecipients, IMailAddress[] blindCarbonCopyRecipients, IMailMessageAttachment[] attachments, String subject, String body) Create a fully specified email message. Note: the message should contain at least one recipient (to/cc/bcc)- Parameters:
sender
- The sender, may not be nullrecipients
- The recipients, may be nullcarbonCopyRecipients
- The cc recipients, may be nullblindCarbonCopyRecipients
- The bcc recipients, may be nullattachments
- The mail message attachments, may be nullsubject
- The subject, may be nullbody
- The body of the message, may be null
-
-
Method Details
-
getBcc
Description copied from interface:IMailMessage
This method returns the recipient addresses that receive a bcc (blind carbon copy) message.- Specified by:
getBcc
in interfaceIMailMessage
- Returns:
- An array of email address, if no bcc specified it must return IMailAddress[0].
-
getBody
Description copied from interface:IMailMessage
This method returns the body of the message.- Specified by:
getBody
in interfaceIMailMessage
- Returns:
- The body of the email message, may be null.
-
getCc
Description copied from interface:IMailMessage
This method returns the recipient addresses that receive a cc (carbon copy) message.- Specified by:
getCc
in interfaceIMailMessage
- Returns:
- An array of email address, if no cc specified it must return IMailAddress[0].
-
getFrom
Description copied from interface:IMailMessage
This method returns the sender's address.- Specified by:
getFrom
in interfaceIMailMessage
- Returns:
- The email addres of the sender, may not be null.
-
getTo
Description copied from interface:IMailMessage
This method returns the recipient addresses.- Specified by:
getTo
in interfaceIMailMessage
- Returns:
- An array of email address, if no recipient specified it must return IMailAddress[0].
-
getAttachments
Description copied from interface:IMailMessage
This method returns the mail attachments.- Specified by:
getAttachments
in interfaceIMailMessage
- Returns:
- An array of mail attachments, never
null
, can beempty
.
-
getSubject
Description copied from interface:IMailMessage
This method returns the subject of the message.- Specified by:
getSubject
in interfaceIMailMessage
- Returns:
- The subject of the email message, may be null.
-