Example usage for Java javax.mail Message fields, constructors, methods, implement or subclass
The text is from its open source code.
void | addFrom(Address[] addresses) Add these addresses to the existing "From" attribute |
void | addHeader(String header_name, String header_value) Add this value to the existing values for this header_name. |
void | addRecipient(RecipientType type, Address address) Add this recipient address to the existing ones of the given type. |
void | addRecipients(RecipientType type, Address[] addresses) Add these recipient addresses to the existing ones of the given type. |
Enumeration | getAllHeaders() Return all the headers from this part as an Enumeration of Header objects. |
Address[] | getAllRecipients() Get all the recipient addresses for the message. |
Object | getContent() Return the content as a Java object. |
String | getContentType() Returns the Content-Type of the content of this part. |
DataHandler | getDataHandler() Return a DataHandler for the content within this part. |
String | getDescription() Return a description String for this part. |
String | getDisposition() Return the disposition of this part. |
String | getFileName() Get the filename associated with this part, if possible. |
Flags | getFlags() Returns a Flags object containing the flags for this message. |
Folder | getFolder() Get the folder from which this message was obtained. |
Address[] | getFrom() Returns the "From" attribute. |
String[] | getHeader(String header_name) Get all the headers for this header name. |
InputStream | getInputStream() Return an input stream for this part's "content". |
int | getLineCount() Return the number of lines in the content of this part. |
int | getMessageNumber() Get the Message number for this Message. |
Date | getReceivedDate() Get the date this message was received. |
Address[] | getRecipients(RecipientType type) Get all the recipient addresses of the given type. |
Address[] | getReplyTo() Get the addresses to which replies should be directed. |
Date | getSentDate() Get the date this message was sent. |
int | getSize() Return the size of the content of this part in bytes. |
String | getSubject() Get the subject of this message. |
boolean | isExpunged() Checks whether this message is expunged. |
boolean | isMimeType(String mimeType) Is this Part of the specified MIME type? |
boolean | isSet(Flags.Flag flag) Check whether the flag specified in the flag argument is set in this message. |
Message | reply(boolean replyToAll) Get a new Message suitable for a reply to this message. |
void | saveChanges() Save any changes made to this message into the message-store when the containing folder is closed, if the message is contained in a folder. |
void | setContent(Object obj, String type) A convenience method for setting this part's content. |
void | setContent(Multipart mp) This method sets the given Multipart object as this message's content. |
void | setDataHandler(DataHandler dh) This method provides the mechanism to set this part's content. |
void | setDisposition(String disposition) Set the disposition of this part. |
void | setFlag(Flags.Flag flag, boolean set) Set the specified flag on this message to the specified value. |
void | setFlags(Flags flag, boolean set) Set the specified flags on this message to the specified value. |
void | setFrom(Address address) Set the "From" attribute in this Message. |
void | setFrom() Set the "From" attribute in this Message. |
void | setHeader(String header_name, String header_value) Set the value for this header_name. |
void | setRecipient(RecipientType type, Address address) Set the recipient address. |
void | setRecipients(RecipientType type, Address[] addresses) Set the recipient addresses. |
void | setReplyTo(Address[] addresses) Set the addresses to which replies should be directed. |
void | setSentDate(Date date) Set the sent date of this message. |
void | setSubject(String subject) Set the subject of this message. |
void | setText(String text) A convenience method that sets the given String as this part's content with a MIME type of "text/plain". |
void | writeTo(OutputStream os) Output a bytestream for this Part. |