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
FieldsModifier and TypeFieldDescriptionstatic final NuclosMailContentTypestatic final NuclosMailContentType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAttachment(NuclosFile pFileToAttach) attaches aNuclosFileto the emailvoidaddInlineAttachment(NuclosFile pFileToAttach) Attaches aNuclosFilerepresenting an inline attachment (e.g.voidaddRecipient(String emailRecipient) adds a new recipient; the given string value will be checked if there is more then one recipient mentioned (semicolon separated)voidaddRecipientBCC(String emailRecipientBCC) adds a new BBC recipient; the given string value will be checked if there is more then one recipient mentioned (semicolon separated)voidaddRecipientCC(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 attachedNuclosFilesgetFrom()returns the name of the senderreturns a map with all header informationReturns a collection of all attachedNuclosFiles 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 emailvoidsetContentType(NuclosMailContentType encoding) Use this method to set the mail type of the currentNuclosMail.
ForNuclosMailContentTypeuse NuclosMail constant values.voidsets the name of the sendervoidadds an entry to the header object of the emailvoidsetMessage(String pEmailMessage) sets the message text of the emailvoidsetReceivedDate(Date receivedDate) Sets the date this mail was received by the server.voidsetReplyTo(String pEmailReplyTo) sets the reply address of the emailvoidsetSentDate(Date sentDate) Sets the date this mail was sent.voidsetSubject(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.
ForNuclosMailContentTypeuse 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 aNuclosFileto the email- Parameters:
pFileToAttach-
-
addInlineAttachment
Attaches aNuclosFilerepresenting 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 attachedNuclosFiles- Returns:
-
getInlineAttachments
Returns a collection of all attachedNuclosFiles 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.
-