public interface Message extends Entity, Body
| Modifier and Type | Method and Description |
|---|---|
void |
createMessageId(String hostname)
Creates and sets a new Message-ID header field for this message.
|
AddressList |
getBcc()
Returns the value of the Bcc header field of this message as
AddressList object or null if it is not
present. |
AddressList |
getCc()
Returns the value of the Cc header field of this message as
AddressList object or null if it is not
present. |
Date |
getDate()
Returns the value of the Date header field of this message as
Date object or null if it is not present. |
MailboxList |
getFrom()
Returns the value of the From header field of this message as
MailboxList object or null if it is not
present. |
String |
getMessageId()
Returns the value of the Message-ID header field of this message
or
null if it is not present. |
AddressList |
getReplyTo()
Returns the value of the Reply-To header field of this message as
AddressList object or null if it is not
present. |
Mailbox |
getSender()
Returns the value of the Sender header field of this message as
Mailbox object or null if it is not
present. |
String |
getSubject()
Returns the (decoded) value of the Subject header field of this
message or
null if it is not present. |
AddressList |
getTo()
Returns the value of the To header field of this message as
AddressList object or null if it is not
present. |
void |
setBcc(Address... bcc)
Sets the Bcc header field of this message to the specified
addresses.
|
void |
setBcc(Address bcc)
Sets the Bcc header field of this message to the specified
address.
|
void |
setBcc(Collection<? extends Address> bcc)
Sets the Bcc header field of this message to the specified
addresses.
|
void |
setCc(Address... cc)
Sets the Cc header field of this message to the specified
addresses.
|
void |
setCc(Address cc)
Sets the Cc header field of this message to the specified
address.
|
void |
setCc(Collection<? extends Address> cc)
Sets the Cc header field of this message to the specified
addresses.
|
void |
setDate(Date date)
Sets the Date header field for this message.
|
void |
setDate(Date date,
TimeZone zone)
Sets the Date header field for this message.
|
void |
setFrom(Collection<Mailbox> from)
Sets the From header field of this message to the specified
mailbox addresses.
|
void |
setFrom(Mailbox... from)
Sets the From header field of this message to the specified
mailbox addresses.
|
void |
setFrom(Mailbox from)
Sets the From header field of this message to the specified
mailbox address.
|
void |
setReplyTo(Address... replyTo)
Sets the Reply-To header field of this message to the specified
addresses.
|
void |
setReplyTo(Address replyTo)
Sets the Reply-To header field of this message to the specified
address.
|
void |
setReplyTo(Collection<? extends Address> replyTo)
Sets the Reply-To header field of this message to the specified
addresses.
|
void |
setSender(Mailbox sender)
Sets the Sender header field of this message to the specified
mailbox address.
|
void |
setSubject(String subject)
Sets the Subject header field for this message.
|
void |
setTo(Address... to)
Sets the To header field of this message to the specified
addresses.
|
void |
setTo(Address to)
Sets the To header field of this message to the specified
address.
|
void |
setTo(Collection<? extends Address> to)
Sets the To header field of this message to the specified
addresses.
|
getBody, getCharset, getContentTransferEncoding, getDispositionType, getFilename, getHeader, getMimeType, getParent, isMultipart, removeBody, setBody, setHeader, setParentdisposeString getMessageId()
null if it is not present.void createMessageId(String hostname)
Header is created if this message does not already have
one.hostname - host name to be included in the identifier or
null if no host name should be included.String getSubject()
null if it is not present.void setSubject(String subject)
Header is created if
this message does not already have one.subject - subject to set or null to remove the subject
header field.Date getDate()
Date object or null if it is not present.void setDate(Date date)
TimeZone of this host to encode the specified
Date object into a string.date - date to set or null to remove the date header
field.void setDate(Date date, TimeZone zone)
TimeZone is used to encode the specified Date
object into a string.date - date to set or null to remove the date header
field.zone - a time zone.Mailbox getSender()
Mailbox object or null if it is not
present.void setSender(Mailbox sender)
sender - address to set or null to remove the header
field.MailboxList getFrom()
MailboxList object or null if it is not
present.void setFrom(Mailbox from)
from - address to set or null to remove the header
field.void setFrom(Mailbox... from)
from - addresses to set or null or no arguments to
remove the header field.void setFrom(Collection<Mailbox> from)
from - addresses to set or null or an empty collection
to remove the header field.AddressList getTo()
AddressList object or null if it is not
present.void setTo(Address to)
to - address to set or null to remove the header
field.void setTo(Address... to)
to - addresses to set or null or no arguments to
remove the header field.void setTo(Collection<? extends Address> to)
to - addresses to set or null or an empty collection
to remove the header field.AddressList getCc()
AddressList object or null if it is not
present.void setCc(Address cc)
cc - address to set or null to remove the header
field.void setCc(Address... cc)
cc - addresses to set or null or no arguments to
remove the header field.void setCc(Collection<? extends Address> cc)
cc - addresses to set or null or an empty collection
to remove the header field.AddressList getBcc()
AddressList object or null if it is not
present.void setBcc(Address bcc)
bcc - address to set or null to remove the header
field.void setBcc(Address... bcc)
bcc - addresses to set or null or no arguments to
remove the header field.void setBcc(Collection<? extends Address> bcc)
bcc - addresses to set or null or an empty collection
to remove the header field.AddressList getReplyTo()
AddressList object or null if it is not
present.void setReplyTo(Address replyTo)
replyTo - address to set or null to remove the header
field.void setReplyTo(Address... replyTo)
replyTo - addresses to set or null or no arguments to
remove the header field.void setReplyTo(Collection<? extends Address> replyTo)
replyTo - addresses to set or null or an empty collection
to remove the header field.Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.