Java javax.mail.internet MimeMessage fields, constructors, methods, implement or subclass

Example usage for Java javax.mail.internet MimeMessage fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for javax.mail.internet MimeMessage.

The text is from its open source code.

Subclass

javax.mail.internet.MimeMessage has subclasses.
Click this link to see all its subclasses.

Constructor

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.

Method

voidaddFrom(Address[] addresses)
Add the specified addresses to the existing "From" field.
voidaddHeader(String name, String value)
Add this value to the existing values for this header_name.
voidaddHeaderLine(String line)
Add a raw RFC 822 header-line.
voidaddRecipient(RecipientType type, Address address)
Add this recipient address to the existing ones of the given type.
voidaddRecipients(Message.RecipientType type, Address[] addresses)
Add the given addresses to the specified recipient type.
voidaddRecipients(Message.RecipientType type, String addresses)
Add the given addresses to the specified recipient type.
EnumerationgetAllHeaderLines()
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.
ObjectgetContent()
Return the content as a Java object.
StringgetContentID()
Returns the value of the "Content-ID" header field.
String[]getContentLanguage()
Get the languages specified in the "Content-Language" header field of this message.
StringgetContentType()
Returns the value of the RFC 822 "Content-Type" header field.
DataHandlergetDataHandler()
Return a DataHandler for this Message's content.
StringgetDescription()
Returns the "Content-Description" header field of this Message.
StringgetDisposition()
Returns the disposition from the "Content-Disposition" header field.
StringgetEncoding()
Returns the content transfer encoding from the "Content-Transfer-Encoding" header field.
StringgetFileName()
Get the filename associated with this Message.
FlagsgetFlags()
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.
StringgetHeader(String name, String delimiter)
Get all the headers for this header name, returned as a single String, with headers separated by the delimiter.
InputStreamgetInputStream()
Return a decoded input stream for this Message's "content".
intgetLineCount()
Return the number of lines for the content of this message.
EnumerationgetMatchingHeaderLines(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.
StringgetMessageID()
Returns the value of the "Message-ID" header field.
intgetMessageNumber()
Get the Message number for this Message.
EnumerationgetNonMatchingHeaderLines(String[] names)
Get non-matching header lines as an Enumeration of Strings.
InputStreamgetRawInputStream()
Return an InputStream to the raw data with any Content-Transfer-Encoding intact.
DategetReceivedDate()
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.
AddressgetSender()
Returns the value of the RFC 822 "Sender" header field.
DategetSentDate()
Returns the value of the RFC 822 "Date" field.
intgetSize()
Return the size of the content of this message in bytes.
StringgetSubject()
Returns the value of the "Subject" header field.
booleanisMimeType(String mimeType)
Is this Part of the specified MIME type?
booleanisSet(Flags.Flag flag)
Check whether the flag specified in the flag argument is set in this message.
voidremoveHeader(String name)
Remove all headers with this name.
Messagereply(boolean replyToAll)
Get a new Message suitable for a reply to this message.
voidsaveChanges()
Updates the appropriate header fields of this message to be consistent with the message's contents.
voidsetContent(Multipart mp)
This method sets the Message's content to a Multipart object.
voidsetContent(Object o, String type)
A convenience method for setting this Message's content.
voidsetContentID(String cid)
Set the "Content-ID" header field of this Message.
voidsetDataHandler(DataHandler dh)
This method provides the mechanism to set this part's content.
voidsetDisposition(String disposition)
Set the disposition in the "Content-Disposition" header field of this body part.
voidsetFileName(String filename)
Set the filename associated with this part, if possible.
voidsetFlag(Flags.Flag flag, boolean set)
Set the specified flag on this message to the specified value.
voidsetFlags(Flags flag, boolean set)
Set the flags for this message.
voidsetFrom(Address address)
Set the RFC 822 "From" header field.
voidsetFrom(String address)
Set the RFC 822 "From" header field.
voidsetFrom()
Set the RFC 822 "From" header field using the value of the InternetAddress.getLocalAddress method.
voidsetHeader(String name, String value)
Set the value for this header_name.
voidsetRecipient(RecipientType type, Address address)
Set the recipient address.
voidsetRecipients(Message.RecipientType type, Address[] addresses)
Set the specified recipient type to the given addresses.
voidsetRecipients(Message.RecipientType type, String addresses)
Set the specified recipient type to the given addresses.
voidsetReplyTo(Address[] addresses)
Set the RFC 822 "Reply-To" header field.
voidsetSender(Address address)
Set the RFC 822 "Sender" header field.
voidsetSentDate(Date d)
Set the RFC 822 "Date" header field.
voidsetSubject(String subject)
Set the "Subject" header field.
voidsetSubject(String subject, String charset)
Set the "Subject" header field.
voidsetText(String text)
Convenience method that sets the given String as this part's content, with a MIME type of "text/plain".
voidsetText(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.
voidsetText(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.
StringtoString()
Returns a string representation of the object.
voidwriteTo(OutputStream os)
Output the message as an RFC 822 format stream.
voidwriteTo(OutputStream os, String[] ignoreList)
Output the message as an RFC 822 format stream, without specified headers.