Name

Message

Synopsis

This is a class that models an email message. Protocol specific subclasses provide the actual implementations. Note that this class defines additional attributes beyond those included in the Part interface, including message recipients, senders, flags and subject.

Where supported by the underlying protocol, data will be read into the Message object as requested by the get methods, rather than when the Message is retrieved from the folder that contains it.

                  
public abstract class Message implements Part {
// Protected Constructors
   protected Message();  
   protected Message( javax.mail.Session session);  
   protected Message( Folder folder, int msgnum);  
// Inner Classes
   public static class RecipientType implements Serializable; 
// Property Accessor Methods (by property name)
   public abstract java.util.Enumeration getAllHeaders(          // Implements:Part
        ) throws MessagingException;  
   public Address[] getAllRecipients(
        ) throws MessagingException;  
   public abstract Object getContent(                            // Implements:Part
        ) throws IOExceptionMessagingException;  
   public abstract void setContent(                              // Implements:Part
        Multipart mp) throws MessagingException;  
   public abstract void setContent(Object obj,                   // Implements:Part
        String type) throws MessagingException;  
   public abstract String getContentType(                        // Implements:Part
        ) throws MessagingException;  
   public abstract javax.activation.DataHandler getDataHandler(  // ...

Get Java Enterprise in a Nutshell, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.