Example usage for Java javax.mail.internet MimeMessage fields, constructors, methods, implement or subclass
The text is from its open source code.
MimeMessage(Session session) Default constructor. | |
MimeMessage(MimeMessage source) Constructs a new MimeMessage with content initialized from the source MimeMessage. | |
MimeMessage(Session session, InputStream is) Constructs a MimeMessage by reading and parsing the data from the specified MIME InputStream. | |
MimeMessage(Folder folder, int msgnum) Constructs an empty MimeMessage object with the given Folder and message number. |
void | addFrom(Address[] addresses) Add the specified addresses to the existing "From" field. |
void | addHeader(String name, String value) Add this value to the existing values for this header_name. |
void | addHeaderLine(String line) Add a raw RFC 822 header-line. |
void | addRecipient(RecipientType type, Address address) Add this recipient address to the existing ones of the given type. |
void | addRecipients(Message.RecipientType type, Address[] addresses) Add the given addresses to the specified recipient type. |
void | addRecipients(Message.RecipientType type, String addresses) Add the given addresses to the specified recipient type. |
Enumeration | getAllHeaderLines() Get all header lines as an Enumeration of Strings. |
Enumeration | getAllHeaders() Return all the headers from this Message 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 | getContentID() Returns the value of the "Content-ID" header field. |
String[] | getContentLanguage() Get the languages specified in the "Content-Language" header field of this message. |
String | getContentType() Returns the value of the RFC 822 "Content-Type" header field. |
DataHandler | getDataHandler() Return a DataHandler for this Message's content. |
String | getDescription() Returns the "Content-Description" header field of this Message. |
String | getDisposition() Returns the disposition from the "Content-Disposition" header field. |
String | getEncoding() Returns the content transfer encoding from the "Content-Transfer-Encoding" header field. |
String | getFileName() Get the filename associated with this Message. |
Flags | getFlags() Return a Flags object containing the flags for this message. |
Address[] | getFrom() Returns the value of the RFC 822 "From" header fields. |
String[] | getHeader(String name) Get all the headers for this header_name. |
String | getHeader(String name, String delimiter) Get all the headers for this header name, returned as a single String, with headers separated by the delimiter. |
InputStream | getInputStream() Return a decoded input stream for this Message's "content". |
int | getLineCount() Return the number of lines for the content of this message. |
Enumeration | getMatchingHeaderLines(String[] names) Get matching header lines as an Enumeration of Strings. |
Enumeration | getMatchingHeaders(String[] names) Return matching headers from this Message as an Enumeration of Header objects. |
String | getMessageID() Returns the value of the "Message-ID" header field. |
int | getMessageNumber() Get the Message number for this Message. |
Enumeration | getNonMatchingHeaderLines(String[] names) Get non-matching header lines as an Enumeration of Strings. |
InputStream | getRawInputStream() Return an InputStream to the raw data with any Content-Transfer-Encoding intact. |
Date | getReceivedDate() Returns the Date on this message was received. |
Address[] | getRecipients(Message.RecipientType type) Returns the recepients specified by the type. |
Address[] | getReplyTo() Return the value of the RFC 822 "Reply-To" header field. |
Address | getSender() Returns the value of the RFC 822 "Sender" header field. |
Date | getSentDate() Returns the value of the RFC 822 "Date" field. |
int | getSize() Return the size of the content of this message in bytes. |
String | getSubject() Returns the value of the "Subject" header field. |
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. |
void | removeHeader(String name) Remove all headers with this name. |
Message | reply(boolean replyToAll) Get a new Message suitable for a reply to this message. |
void | saveChanges() Updates the appropriate header fields of this message to be consistent with the message's contents. |
void | setContent(Multipart mp) This method sets the Message's content to a Multipart object. |
void | setContent(Object o, String type) A convenience method for setting this Message's content. |
void | setContentID(String cid) Set the "Content-ID" header field of this Message. |
void | setDataHandler(DataHandler dh) This method provides the mechanism to set this part's content. |
void | setDisposition(String disposition) Set the disposition in the "Content-Disposition" header field of this body part. |
void | setFileName(String filename) Set the filename associated with this part, if possible. |
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 flags for this message. |
void | setFrom(Address address) Set the RFC 822 "From" header field. |
void | setFrom(String address) Set the RFC 822 "From" header field. |
void | setFrom() Set the RFC 822 "From" header field using the value of the InternetAddress.getLocalAddress method. |
void | setHeader(String name, String value) Set the value for this header_name. |
void | setRecipient(RecipientType type, Address address) Set the recipient address. |
void | setRecipients(Message.RecipientType type, Address[] addresses) Set the specified recipient type to the given addresses. |
void | setRecipients(Message.RecipientType type, String addresses) Set the specified recipient type to the given addresses. |
void | setReplyTo(Address[] addresses) Set the RFC 822 "Reply-To" header field. |
void | setSender(Address address) Set the RFC 822 "Sender" header field. |
void | setSentDate(Date d) Set the RFC 822 "Date" header field. |
void | setSubject(String subject) Set the "Subject" header field. |
void | setSubject(String subject, String charset) Set the "Subject" header field. |
void | setText(String text) Convenience method that sets the given String as this part's content, with a MIME type of "text/plain". |
void | setText(String text, String charset) Convenience method that sets the given String as this part's content, with a MIME type of "text/plain" and the specified charset. |
void | setText(String text, String charset, String subtype) Convenience method that sets the given String as this part's content, with a primary MIME type of "text" and the specified MIME subtype. |
String | toString() Returns a string representation of the object. |
void | writeTo(OutputStream os) Output the message as an RFC 822 format stream. |
void | writeTo(OutputStream os, String[] ignoreList) Output the message as an RFC 822 format stream, without specified headers. |