## Uses of Class
javax.mail.Message

- Packages that use Message
  Package | Description
  --- | ---
  com.sun.mail.dsn | Support for creating and parsing Delivery Status Notifications.
  com.sun.mail.gimap | An EXPERIMENTAL IMAP protocol provider that supports the Gmail-specific IMAP protocol extensions .
  com.sun.mail.imap | An IMAP protocol provider for the JavaMail API that provides access to an IMAP message store.
  com.sun.mail.pop3 | A POP3 protocol provider for the JavaMail API that provides access to a POP3 message store.
  com.sun.mail.smtp | An SMTP protocol provider for the JavaMail API that provides access to an SMTP server.
  javax.mail | The JavaMailTM API provides classes that model a mail system.
  javax.mail.event | Listeners and events for the JavaMail API.
  javax.mail.internet | Classes specific to Internet mail systems.
  javax.mail.search | Message search terms for the JavaMail API.

- - ### Uses of Message in com.sun.mail.dsn

    Subclasses of Message in com.sun.mail.dsn
    Modifier and Type | Class and Description
    --- | ---
    `class` | `MessageHeaders` A special MimeMessage object that contains only message headers, no content.

  - ### Uses of Message in com.sun.mail.gimap

    Subclasses of Message in com.sun.mail.gimap
    Modifier and Type | Class and Description
    --- | ---
    `class` | `GmailMessage` A Gmail message.

    Methods in com.sun.mail.gimap with parameters of type Message
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | GmailMsgIdTerm.`match(Message msg)` The match method.
    `boolean` | GmailThrIdTerm.`match(Message msg)` The match method.
    `boolean` | GmailRawSearchTerm.`match(Message msg)` The match method.
    `void` | GmailFolder.`setLabels(Message[] msgs, String[] labels, boolean set)` Set the specified labels for the given array of messages.

  - ### Uses of Message in com.sun.mail.imap

    Subclasses of Message in com.sun.mail.imap
    Modifier and Type | Class and Description
    --- | ---
    `class` | `IMAPMessage` This class implements an IMAPMessage object.
    `class` | `IMAPNestedMessage` This class implements a nested IMAP message

    Methods in com.sun.mail.imap that return Message
    Modifier and Type | Method and Description
    --- | ---
    `Message[]` | IMAPFolder.`addMessages(Message[] msgs)` Append the given messages into this folder.
    `Message[]` | DefaultFolder.`expunge()`
    `Message[]` | IMAPFolder.`expunge()` Expunge all messages marked as DELETED.
    `Message[]` | IMAPFolder.`expunge(Message[] msgs)` Expunge the indicated messages, which must have been marked as DELETED.
    `Message` | IMAPFolder.`getMessage(int msgnum)` Get the specified message.
    `Message` | IMAPFolder.`getMessageByUID(long uid)` Get the Message corresponding to the given UID.
    `Message[]` | IMAPFolder.`getMessages()` Get all Message objects from this Folder.
    `Message[]` | IMAPFolder.`getMessagesByUID(long[] uids)` Get the Messages specified by the given array.
    `Message[]` | IMAPFolder.`getMessagesByUID(long start, long end)` Get the Messages specified by the given range.
    `Message[]` | IMAPFolder.`getMessagesByUIDChangedSince(long start, long end, long modseq)` Get the messages that have been changed since the given MODSEQ value.
    `Message[]` | IMAPFolder.`getSortedMessages(SortTerm[] term)` Sort the messages in the folder according to the sort criteria.
    `Message[]` | IMAPFolder.`getSortedMessages(SortTerm[] term, SearchTerm sterm)` Sort the messages in the folder according to the sort criteria.
    `Message[]` | IMAPFolder.`search(SearchTerm term)` Search whole folder for messages matching the given term.
    `Message[]` | IMAPFolder.`search(SearchTerm term, Message[] msgs)` Search the folder for messages matching the given term.

    Methods in com.sun.mail.imap with parameters of type Message
    Modifier and Type | Method and Description
    --- | ---
    `Message[]` | IMAPFolder.`addMessages(Message[] msgs)` Append the given messages into this folder.
    `void` | DefaultFolder.`appendMessages(Message[] msgs)`
    `void` | IMAPFolder.`appendMessages(Message[] msgs)` Append the given messages into this folder.
    `AppendUID[]` | IMAPFolder.`appendUIDMessages(Message[] msgs)` Append the given messages into this folder.
    `void` | IMAPFolder.`copyMessages(Message[] msgs, Folder folder)` Copy the specified messages from this folder, to the specified destination.
    `AppendUID[]` | IMAPFolder.`copyUIDMessages(Message[] msgs, Folder folder)` Copy the specified messages from this folder, to the specified destination.
    `Message[]` | IMAPFolder.`expunge(Message[] msgs)` Expunge the indicated messages, which must have been marked as DELETED.
    `void` | IMAPFolder.`fetch(Message[] msgs, FetchProfile fp)` Prefetch attributes, based on the given FetchProfile.
    `long` | IMAPFolder.`getUID(Message message)` Get the UID for the specified message.
    `boolean` | OlderTerm.`match(Message msg)` The match method.
    `boolean` | YoungerTerm.`match(Message msg)` The match method.
    `boolean` | ModifiedSinceTerm.`match(Message msg)` The match method.
    `void` | IMAPFolder.`moveMessages(Message[] msgs, Folder folder)` Copy the specified messages from this folder, to the specified destination.
    `AppendUID[]` | IMAPFolder.`moveUIDMessages(Message[] msgs, Folder folder)` Copy the specified messages from this folder, to the specified destination.
    `IMAPMessage[]` | MessageCache.`removeExpungedMessages(Message[] msgs)` Remove expunged messages in msgs from the array, returning a list of removed message objects.
    `Message[]` | IMAPFolder.`search(SearchTerm term, Message[] msgs)` Search the folder for messages matching the given term.
    `void` | IMAPFolder.`setFlags(Message[] msgs, Flags flag, boolean value)` Set the specified flags for the given array of messages.
    `static MessageSet[]` | Utility.`toMessageSet(Message[] msgs, Utility.Condition cond)` Run thru the given array of messages, apply the given Condition on each message and generate sets of contiguous sequence-numbers for the successful messages.
    `static MessageSet[]` | Utility.`toMessageSetSorted(Message[] msgs, Utility.Condition cond)` Sort (a copy of) the given array of messages and then run thru the sorted array of messages, apply the given Condition on each message and generate sets of contiguous sequence-numbers for the successful messages.
    `static UIDSet[]` | Utility.`toUIDSet(Message[] msgs)` Return UIDSets for the messages.

  - ### Uses of Message in com.sun.mail.pop3

    Subclasses of Message in com.sun.mail.pop3
    Modifier and Type | Class and Description
    --- | ---
    `class` | `POP3Message` A POP3 Message.

    Methods in com.sun.mail.pop3 that return Message
    Modifier and Type | Method and Description
    --- | ---
    `Message[]` | POP3Folder.`expunge()` Always throws `MethodNotSupportedException` because the POP3 protocol doesn't support expunging messages without closing the folder; call the `close` method with the `expunge` argument set to `true` instead.
    `Message[]` | DefaultFolder.`expunge()`
    `Message` | POP3Folder.`getMessage(int msgno)`
    `Message` | DefaultFolder.`getMessage(int msgno)`

    Methods in com.sun.mail.pop3 with parameters of type Message
    Modifier and Type | Method and Description
    --- | ---
    `void` | POP3Folder.`appendMessages(Message[] msgs)` Always throws `MethodNotSupportedException` because the POP3 protocol doesn't support appending messages.
    `void` | DefaultFolder.`appendMessages(Message[] msgs)`
    `void` | POP3Folder.`fetch(Message[] msgs, FetchProfile fp)` Prefetch information about POP3 messages.
    `String` | POP3Folder.`getUID(Message msg)` Return the unique ID string for this message, or null if not available.
    `protected void` | POP3Folder.`notifyMessageChangedListeners(int type, Message m)`

  - ### Uses of Message in com.sun.mail.smtp

    Subclasses of Message in com.sun.mail.smtp
    Modifier and Type | Class and Description
    --- | ---
    `class` | `SMTPMessage` This class is a specialization of the MimeMessage class that allows you to specify various SMTP options and parameters that will be used when this message is sent over SMTP.

    Methods in com.sun.mail.smtp with parameters of type Message
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | SMTPTransport.`notifyTransportListeners(int type, Address[] validSent, Address[] validUnsent, Address[] invalid, Message msg)` Notify all TransportListeners.
    `void` | SMTPTransport.`sendMessage(Message message, Address[] addresses)` Send the Message to the specified list of addresses.

  - ### Uses of Message in javax.mail

    Methods in javax.mail that return Message
    Modifier and Type | Method and Description
    --- | ---
    `abstract Message[]` | Folder.`expunge()` Expunge (permanently remove) messages marked DELETED.
    `Message` | MessageContext.`getMessage()` Return the Message that contains the content.
    `abstract Message` | Folder.`getMessage(int msgnum)` Get the Message object corresponding to the given message number.
    `Message` | UIDFolder.`getMessageByUID(long uid)` Get the Message corresponding to the given UID.
    `Message[]` | Folder.`getMessages()` Get all Message objects from this Folder.
    `Message[]` | Folder.`getMessages(int[] msgnums)` Get the Message objects for message numbers specified in the array.
    `Message[]` | Folder.`getMessages(int start, int end)` Get the Message objects for message numbers ranging from start through end, both start and end inclusive.
    `Message[]` | UIDFolder.`getMessagesByUID(long[] uids)` Get the Messages specified by the given array of UIDs.
    `Message[]` | UIDFolder.`getMessagesByUID(long start, long end)` Get the Messages specified by the given range.
    `abstract Message` | Message.`reply(boolean replyToAll)` Get a new Message suitable for a reply to this message.
    `Message[]` | Folder.`search(SearchTerm term)` Search this Folder for messages matching the specified search criterion.
    `Message[]` | Folder.`search(SearchTerm term, Message[] msgs)` Search the given array of messages for those that match the specified search criterion.

    Methods in javax.mail with parameters of type Message
    Modifier and Type | Method and Description
    --- | ---
    `abstract void` | Folder.`appendMessages(Message[] msgs)` Append given Messages to this folder.
    `void` | Folder.`copyMessages(Message[] msgs, Folder folder)` Copy the specified Messages from this Folder into another Folder.
    `void` | Folder.`fetch(Message[] msgs, FetchProfile fp)` Prefetch the items specified in the FetchProfile for the given Messages.
    `long` | UIDFolder.`getUID(Message message)` Get the UID for the specified message.
    `protected void` | Folder.`notifyMessageAddedListeners(Message[] msgs)` Notify all MessageCountListeners about the addition of messages into this folder.
    `protected void` | Folder.`notifyMessageChangedListeners(int type, Message msg)` Notify all MessageChangedListeners.
    `protected void` | Folder.`notifyMessageRemovedListeners(boolean removed, Message[] msgs)` Notify all MessageCountListeners about the removal of messages from this Folder.
    `protected void` | Transport.`notifyTransportListeners(int type, Address[] validSent, Address[] validUnsent, Address[] invalid, Message msg)` Notify all TransportListeners.
    `Message[]` | Folder.`search(SearchTerm term, Message[] msgs)` Search the given array of messages for those that match the specified search criterion.
    `static void` | Transport.`send(Message msg)` Send a message.
    `static void` | Transport.`send(Message msg, Address[] addresses)` Send the message to the specified addresses, ignoring any recipients specified in the message itself.
    `static void` | Transport.`send(Message msg, Address[] addresses, String user, String password)` Send the message to the specified addresses, ignoring any recipients specified in the message itself.
    `static void` | Transport.`send(Message msg, String user, String password)` Send a message.
    `abstract void` | Transport.`sendMessage(Message msg, Address[] addresses)` Send the Message to the specified list of addresses.
    `void` | Folder.`setFlags(Message[] msgs, Flags flag, boolean value)` Set the specified flags on the messages specified in the array.

  - ### Uses of Message in javax.mail.event

    Fields in javax.mail.event declared as Message
    Modifier and Type | Field and Description
    --- | ---
    `protected Message` | MessageChangedEvent.`msg` The message that changed.
    `protected Message` | TransportEvent.`msg` The Message to which this event applies.
    `protected Message[]` | MessageCountEvent.`msgs` The messages.

    Methods in javax.mail.event that return Message
    Modifier and Type | Method and Description
    --- | ---
    `Message` | MessageChangedEvent.`getMessage()` Return the changed Message.
    `Message` | TransportEvent.`getMessage()` Get the Message object associated with this Transport Event.
    `Message[]` | MessageCountEvent.`getMessages()` Return the array of messages added or removed.

    Constructors in javax.mail.event with parameters of type Message
    Constructor and Description
    `MessageChangedEvent(Object source, int type, Message msg)` Constructor.
    `MessageCountEvent(Folder folder, int type, boolean removed, Message[] msgs)` Constructor.
    `TransportEvent(Transport transport, int type, Address[] validSent, Address[] validUnsent, Address[] invalid, Message msg)` Constructor.

  - ### Uses of Message in javax.mail.internet

    Subclasses of Message in javax.mail.internet
    Modifier and Type | Class and Description
    --- | ---
    `class` | `MimeMessage` This class represents a MIME style email message.

    Methods in javax.mail.internet that return Message
    Modifier and Type | Method and Description
    --- | ---
    `Message` | MimeMessage.`reply(boolean replyToAll)` Get a new Message suitable for a reply to this message.
    `Message` | MimeMessage.`reply(boolean replyToAll, boolean setAnswered)` Get a new Message suitable for a reply to this message.

  - ### Uses of Message in javax.mail.search

    Methods in javax.mail.search with parameters of type Message
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | SubjectTerm.`match(Message msg)` The match method.
    `boolean` | FlagTerm.`match(Message msg)` The comparison method.
    `boolean` | NotTerm.`match(Message msg)`
    `boolean` | FromTerm.`match(Message msg)` The address comparator.
    `abstract boolean` | SearchTerm.`match(Message msg)` This method applies a specific match criterion to the given message and returns the result.
    `boolean` | SizeTerm.`match(Message msg)` The match method.
    `boolean` | OrTerm.`match(Message msg)` The OR operation.
    `boolean` | FromStringTerm.`match(Message msg)` Check whether the address string specified in the constructor is a substring of the From address of this Message.
    `boolean` | ReceivedDateTerm.`match(Message msg)` The match method.
    `boolean` | HeaderTerm.`match(Message msg)` The header match method.
    `boolean` | MessageIDTerm.`match(Message msg)` The match method.
    `boolean` | RecipientTerm.`match(Message msg)` The match method.
    `boolean` | BodyTerm.`match(Message msg)` The match method.
    `boolean` | RecipientStringTerm.`match(Message msg)` Check whether the address specified in the constructor is a substring of the recipient address of this Message.
    `boolean` | MessageNumberTerm.`match(Message msg)` The match method.
    `boolean` | SentDateTerm.`match(Message msg)` The match method.
    `boolean` | AndTerm.`match(Message msg)` The AND operation.

Copyright © 2016 Oracle. All rights reserved.