Java javax.mail Message fields, constructors, methods, implement or subclass

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

Introduction

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

The text is from its open source code.

Method

voidaddFrom(Address[] addresses)
Add these addresses to the existing "From" attribute
voidaddHeader(String header_name, String header_value)
Add this value to the existing values for this header_name.
voidaddRecipient(RecipientType type, Address address)
Add this recipient address to the existing ones of the given type.
voidaddRecipients(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.
ObjectgetContent()
Return the content as a Java object.
StringgetContentType()
Returns the Content-Type of the content of this part.
DataHandlergetDataHandler()
Return a DataHandler for the content within this part.
StringgetDescription()
Return a description String for this part.
StringgetDisposition()
Return the disposition of this part.
StringgetFileName()
Get the filename associated with this part, if possible.
FlagsgetFlags()
Returns a Flags object containing the flags for this message.
FoldergetFolder()
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.
InputStreamgetInputStream()
Return an input stream for this part's "content".
intgetLineCount()
Return the number of lines in the content of this part.
intgetMessageNumber()
Get the Message number for this Message.
DategetReceivedDate()
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.
DategetSentDate()
Get the date this message was sent.
intgetSize()
Return the size of the content of this part in bytes.
StringgetSubject()
Get the subject of this message.
booleanisExpunged()
Checks whether this message is expunged.
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.
Messagereply(boolean replyToAll)
Get a new Message suitable for a reply to this message.
voidsaveChanges()
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.
voidsetContent(Object obj, String type)
A convenience method for setting this part's content.
voidsetContent(Multipart mp)
This method sets the given Multipart object as this message's content.
voidsetDataHandler(DataHandler dh)
This method provides the mechanism to set this part's content.
voidsetDisposition(String disposition)
Set the disposition of this part.
voidsetFlag(Flags.Flag flag, boolean set)
Set the specified flag on this message to the specified value.
voidsetFlags(Flags flag, boolean set)
Set the specified flags on this message to the specified value.
voidsetFrom(Address address)
Set the "From" attribute in this Message.
voidsetFrom()
Set the "From" attribute in this Message.
voidsetHeader(String header_name, String header_value)
Set the value for this header_name.
voidsetRecipient(RecipientType type, Address address)
Set the recipient address.
voidsetRecipients(RecipientType type, Address[] addresses)
Set the recipient addresses.
voidsetReplyTo(Address[] addresses)
Set the addresses to which replies should be directed.
voidsetSentDate(Date date)
Set the sent date of this message.
voidsetSubject(String subject)
Set the subject of this message.
voidsetText(String text)
A convenience method that sets the given String as this part's content with a MIME type of "text/plain".
voidwriteTo(OutputStream os)
Output a bytestream for this Part.