|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.goldeninnovations.smp.EmailMessage
public abstract class EmailMessage
Represents an incoming Email Message. This class contains the raw message and convenience accessor methods to enable access to individual message attributes.
This class is not thread-safe.
Constructor Summary | |
---|---|
EmailMessage()
|
Method Summary | |
---|---|
abstract void |
addToAddress(EmailAddress address)
Email addresses of the recipients specified by the remote SMPT server. |
String |
getContentType()
Returns the Content-Type for this email, if specified. |
abstract EmailAddress |
getFromAddress()
The email address of the sender specified by the remote SMTP server. |
String |
getFromHeader()
The value of the From header |
String |
getHeader(String headerName)
Returns the value of first header found that matches the header name. |
List<String> |
getHeaders()
Returns a collection of the headers from this message. |
String[] |
getHeaders(String headerName)
Returns all of the values of the specified header name. |
MessagePart |
getMessagePart(int index)
Returns the specified MessagePart |
int |
getMessagePartCount()
The number of MessagePart s in this message. |
List<MessagePart> |
getMessageParts()
A List of the MessagePart s found in this message. |
abstract String |
getRawMessage()
The entire message as a single String . |
abstract InetAddress |
getSenderInetAddress()
The Internet Address of the sending SMTP Server |
String |
getSubjectHeader()
The value of the Subject header. |
abstract List<EmailAddress> |
getToAddress()
Email addresses of the recipients specified by the remote SMPT server. |
String |
getToHeader()
The value of the (first) To header |
String[] |
getToHeaders()
The values of all the To headers |
boolean |
isMulitpartMessage()
Returns true if this message is a Multi-Part Message. |
abstract void |
setFrom(EmailAddress address)
The email address of the sender specified by the remote SMTP server. |
abstract void |
setRawMessage(String rawMessage)
The entire message as a single String |
abstract void |
setSenderInetAddress(InetAddress senderAddress)
The Internet Address of the sending SMTP Server |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EmailMessage()
Method Detail |
---|
public abstract InetAddress getSenderInetAddress()
public abstract void setSenderInetAddress(InetAddress senderAddress)
senderAddress
- address of the sending SMTP server.public abstract EmailAddress getFromAddress()
This may be different than the email address in the from header.
public abstract void setFrom(EmailAddress address)
This may be different than the email address in the from header.
address
- email address of the sender.public abstract List<EmailAddress> getToAddress()
This may be different than the email address in the from header.
public abstract void addToAddress(EmailAddress address)
This may be different than the email address in the from header.
address
- addresses of the recipients.public abstract String getRawMessage()
String
.
public abstract void setRawMessage(String rawMessage)
String
rawMessage
- the entire messagepublic String getSubjectHeader()
public String getFromHeader()
This can be different from the fromAddress
. This value is
specified in the message header while the fromAddress
is given
to the SMTP server.
public String getToHeader()
This can be different from the toAddress
. This value is
specified in the message header while the toAddress
is given
to the SMTP server.
public String[] getToHeaders()
This can be different from the toAddress
. This value is
specified in the message header while the toAddress
is given
to the SMTP server.
public String getContentType()
public boolean isMulitpartMessage()
public int getMessagePartCount()
MessagePart
s in this message.
MessagePart
spublic MessagePart getMessagePart(int index)
MessagePart
index
- the index of the MessagePart to return.
public List<MessagePart> getMessageParts()
MessagePart
s found in this message.
MessagePart
, or empty list.public List<String> getHeaders()
The headers are all a single line in the form of '<key>: <value>'
String
spublic String getHeader(String headerName)
headerName
- the name of the header to find.
public String[] getHeaders(String headerName)
headerName
- the name of the header to find.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |