Package org.nuclos.api.mail
Class NuclosMail
java.lang.Object
org.nuclos.api.mail.NuclosMail
class representing an email-object
org.nuclos.api.provider.MailProvider
- Author:
- Matthias Reichart
-
Field Summary
Modifier and TypeFieldDescriptionstatic final NuclosMailContentType
static final NuclosMailContentType
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAttachment
(NuclosFile pFileToAttach) attaches aNuclosFile
to the emailvoid
addInlineAttachment
(NuclosFile pFileToAttach) Attaches aNuclosFile
representing an inline attachment (e.g.void
addRecipient
(String emailRecipient) adds a new recipient; the given string value will be checked if there is more then one recipient mentioned (semicolon separated)void
addRecipientBCC
(String emailRecipientBCC) adds a new BBC recipient; the given string value will be checked if there is more then one recipient mentioned (semicolon separated)void
addRecipientCC
(String emailRecipientCC) adds a new CC recipient; the given string value will be checked if there is more then one recipient mentioned (semicolon separated)returns a collection of all attachedNuclosFile
sgetFrom()
returns the name of the senderreturns a map with all header informationReturns a collection of all attachedNuclosFile
s representing inline attachments (e.g.returns the mail charset, e.g.returns the mail type, e.g.returns the message text of the emailGets the date this mail was received by the server.returns a list of all recipientsreturns a list of all recipientsBCCreturns a list of all recipientsCCreturns the reply address of the emailGets the date this mail was sent.returns the subject of the emailvoid
setContentType
(NuclosMailContentType encoding) Use this method to set the mail type of the currentNuclosMail
.
ForNuclosMailContentType
use NuclosMail constant values.void
sets the name of the sendervoid
adds an entry to the header object of the emailvoid
setMessage
(String pEmailMessage) sets the message text of the emailvoid
setReceivedDate
(Date receivedDate) Sets the date this mail was received by the server.void
setReplyTo
(String pEmailReplyTo) sets the reply address of the emailvoid
setSentDate
(Date sentDate) Sets the date this mail was sent.void
setSubject
(String pEmailsubject) sets the subject of the email
-
Field Details
-
HTML
-
PLAIN
-
-
Constructor Details
-
NuclosMail
public NuclosMail() -
NuclosMail
-
-
Method Details
-
setFrom
sets the name of the sender- Parameters:
pNameAuthor
-
-
getFrom
returns the name of the sender- Returns:
-
setContentType
Use this method to set the mail type of the currentNuclosMail
.
ForNuclosMailContentType
use NuclosMail constant values.- Parameters:
encoding
-
-
addRecipient
adds a new recipient; the given string value will be checked if there is more then one recipient mentioned (semicolon separated)- Parameters:
emailRecipient
-
-
getRecipients
returns a list of all recipients- Returns:
-
addRecipientCC
adds a new CC recipient; the given string value will be checked if there is more then one recipient mentioned (semicolon separated)- Parameters:
emailRecipientCC
-
-
getRecipientsCC
returns a list of all recipientsCC- Returns:
-
addRecipientBCC
adds a new BBC recipient; the given string value will be checked if there is more then one recipient mentioned (semicolon separated)- Parameters:
emailRecipientBCC
-
-
getRecipientsBCC
returns a list of all recipientsBCC- Returns:
-
setSubject
sets the subject of the email- Parameters:
pEmailsubject
-
-
setMessage
sets the message text of the email- Parameters:
pEmailMessage
-
-
setReplyTo
sets the reply address of the email- Parameters:
pEmailReplyTo
-
-
addAttachment
attaches aNuclosFile
to the email- Parameters:
pFileToAttach
-
-
addInlineAttachment
Attaches aNuclosFile
representing an inline attachment (e.g. an embedded image) to the email.- Parameters:
pFileToAttach
-
-
setHeader
adds an entry to the header object of the email- Parameters:
pProperty
- - keypValue
- - value
-
getSubject
returns the subject of the email- Returns:
-
getMessage
returns the message text of the email- Returns:
-
getReplyTo
returns the reply address of the email- Returns:
-
getAttachments
returns a collection of all attachedNuclosFile
s- Returns:
-
getInlineAttachments
Returns a collection of all attachedNuclosFile
s representing inline attachments (e.g. embedded images).- Returns:
-
getHeaders
returns a map with all header information- Returns:
-
getMailType
returns the mail type, e.g. text/html or text/plain- Returns:
-
getMailCharset
returns the mail charset, e.g. UTF-8- Returns:
-
getReceivedDate
Gets the date this mail was received by the server.- Returns:
-
setReceivedDate
Sets the date this mail was received by the server. -
getSentDate
Gets the date this mail was sent.- Returns:
-
setSentDate
Sets the date this mail was sent.
-