This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


com.sun.mail.imap
class IMAPFolder

javax.mail.Folder extended by com.sun.mail.imap.IMAPFolder
All Implemented Interfaces:
ResponseHandler, UIDFolder
Direct Known Subclasses:
DefaultFolder

Most common way to construct:

IMAPFolder f = (IMAPFolder)folder;

Based on 42 examples


public class IMAPFolder
extends Folder
implements UIDFolder, ResponseHandler

This class implements an IMAP folder.

A closed IMAPFolder object shares a protocol connection with its IMAPStore object. When the folder is opened, it gets its own protocol connection.

Applications that need to make use of IMAP-specific features may cast a Folder object to an IMAPFolder object and use the methods on this class. The {@link #getQuota getQuota} and {@link #setQuota setQuota} methods support the IMAP QUOTA extension. Refer to RFC 2087 for more information.

The {@link #getACL getACL}, {@link #addACL addACL}, {@link #removeACL removeACL}, {@link #addRights addRights}, {@link #removeRights removeRights}, {@link #listRights listRights}, and {@link #myRights myRights} methods support the IMAP ACL extension. Refer to RFC 2086 for more information.

The {@link #doCommand doCommand} method and {@link IMAPFolder.ProtocolCommand IMAPFolder.ProtocolCommand} interface support use of arbitrary IMAP protocol commands.

See the com.sun.mail.imap package documentation for further information on the IMAP protocol provider.

WARNING: The APIs unique to this class should be considered EXPERIMENTAL. They may be changed in the future in ways that are incompatible with applications using the current APIs.


Nested Class Summary
static class

           A fetch profile item for fetching headers.
static interface

           A simple interface for user-defined IMAP protocol commands.
 
Field Summary
protected String[] attributes
          
protected Flags availableFlags
          
protected boolean exists
          
protected String fullName
          
protected boolean isNamespace
          
protected Vector messageCache
          
protected Object messageCacheLock
          
protected String name
          
protected Flags permanentFlags
          
protected IMAPProtocol protocol
          
protected char separator
          
protected int type
          
protected Hashtable uidTable
          
protected static char UNKNOWN_SEPARATOR
          
 
Fields inherited from class javax.mail.Folder
HOLDS_FOLDERS, HOLDS_MESSAGES, mode, READ_ONLY, READ_WRITE, store
 
Constructor Summary
protected

          Constructor used to create an existing folder.
protected
IMAPFolder(String fullName, char separator, IMAPStore store)

          Constructor used to create a possibly non-existent folder.
protected
IMAPFolder(String fullName, char separator, IMAPStore store, boolean isNamespace)

          Constructor used to create a possibly non-existent folder.
 
Method Summary
 void
addACL(ACL acl)

          Add an access control list entry to the access control list for this folder.
 Message[]

          Append the given messages into this folder.
 void

          Add the rights specified in the ACL to the entry for the identifier specified in the ACL.
 void

          Append the given messages into this folder.
 AppendUID[]

          Append the given messages into this folder.
 void
close(boolean expunge)

          Close this folder.
 void
copyMessages(Message[] msgs, Folder folder)

          Copy the specified messages from this folder, to the specified destination.
 boolean
create(int type)

          Create this folder, with the specified type.
 boolean
delete(boolean recurse)

          Delete this folder.
 Object

          Execute a user-supplied IMAP command.
 Object

          
 Object

          
protected Object

          
 boolean

          Check whether this folder really exists on the server.
 Message[]

          Expunge all messages marked as DELETED.
 Message[]
expunge(Message[] msgs)

          Expunge the indicated messages, which must have been marked as DELETED.
 void
fetch(Message[] msgs, FetchProfile fp)

          Prefetch attributes, based on the given FetchProfile.
 void

          Close this folder without waiting for the server.
 ACL[]

          Get the access control list entries for this folder.
 String[]

          Get the attributes that the IMAP server returns with the LIST response.
 int

          Get the deleted message count.
 Folder

          Get the named subfolder.
 String

          Get the fullname of this folder.
 Message
getMessage(int msgnum)

          Get the specified message.
 Message
getMessageByUID(long uid)

          Get the Message corresponding to the given UID.
 int

          Get the total message count.
 Message[]
getMessagesByUID(long start, long end)

          Get the Messages specified by the given range.
 Message[]
getMessagesByUID(long[] uids)

          Get the Messages specified by the given array.
 String

          Get the name of this folder.
 int

          Get the new message count.
 Folder

          Get this folder's parent.
 Flags

          Return the permanent flags supported by the server.
 Quota[]

          Get the quotas for the quotaroot associated with this folder.
 char

          Get the separator character.
protected IMAPProtocol

          Get this folder's Store's protocol connection.
 int

          Get the type of this folder.
 long
getUID(Message message)

          Get the UID for the specified message.
 long

          Returns the predicted UID that will be assigned to the next message that is appended to this folder.
 long

          Returns the UIDValidity for this folder.
 int

          Get the unread message count.
 void

          The response handler.
 boolean

          Check whether this folder has new messages.
 void

          Use the IMAP IDLE command (see RFC 2177), if supported by the server, to enter idle mode so that the server can send unsolicited notifications of new messages arriving, etc.
 boolean

          Check whether this connection is really open.
 boolean

          Check whether this folder is subscribed.
 Folder[]
list(String pattern)

          List all subfolders matching the specified pattern.
 Rights[]

          Get all the rights that may be allowed to the given identifier.
 Folder[]

          List all subscribed subfolders matching the specified pattern.
 Rights

          Get the rights allowed to the currently authenticated user.
 void
open(int mode)

          Open this folder in the given mode.
protected void

          Release the store protocol object.
 void

          Remove any access control list entry for the given identifier from the access control list for this folder.
 void

          Remove the rights specified in the ACL from the entry for the identifier specified in the ACL.
 boolean

          Rename this folder.
 Message[]

          Search whole folder for messages matching the given term.
 Message[]
search(SearchTerm term, Message[] msgs)

          Search the folder for messages matching the given term.
 void
setFlags(Message[] msgs, Flags flag, boolean value)

          Set the specified flags for the given array of messages.
 void
setQuota(Quota quota)

          Set the quotas for the quotaroot specified in the quota argument.
 void
setSubscribed(boolean subscribe)

          Subscribe/Unsubscribe this folder.
 
Methods inherited from class javax.mail.Folder
addConnectionListener, addFolderListener, addMessageChangedListener, addMessageCountListener, appendMessages, close, copyMessages, create, delete, exists, expunge, fetch, finalize, getDeletedMessageCount, getFolder, getFullName, getMessage, getMessageCount, getMessages, getMessages, getMessages, getMode, getName, getNewMessageCount, getParent, getPermanentFlags, getSeparator, getStore, getType, getUnreadMessageCount, getURLName, hasNewMessages, isOpen, isSubscribed, list, list, listSubscribed, listSubscribed, notifyConnectionListeners, notifyFolderListeners, notifyFolderRenamedListeners, notifyMessageAddedListeners, notifyMessageChangedListeners, notifyMessageRemovedListeners, open, removeConnectionListener, removeFolderListener, removeMessageChangedListener, removeMessageCountListener, renameTo, search, search, setFlags, setFlags, setFlags, setSubscribed, toString
 

Field Detail

attributes

protected String[] attributes

availableFlags

protected Flags availableFlags

exists

protected boolean exists

fullName

protected String fullName

isNamespace

protected boolean isNamespace

messageCache

protected Vector messageCache

messageCacheLock

protected Object messageCacheLock

name

protected String name

permanentFlags

protected Flags permanentFlags

protocol

protected IMAPProtocol protocol

separator

protected char separator

type

protected int type

uidTable

protected Hashtable uidTable

UNKNOWN_SEPARATOR

protected static final char UNKNOWN_SEPARATOR
Constructor Detail

IMAPFolder

protected IMAPFolder(ListInfo li,
                     IMAPStore store)
Constructor used to create an existing folder.

Parameters:
li
store

IMAPFolder

protected IMAPFolder(String fullName,
                     char separator,
                     IMAPStore store)
Constructor used to create a possibly non-existent folder.

Parameters:
fullName - fullname of this folder
separator - the default separator character for this folder's namespace
store - the Store

IMAPFolder

protected IMAPFolder(String fullName,
                     char separator,
                     IMAPStore store,
                     boolean isNamespace)
Constructor used to create a possibly non-existent folder.

Parameters:
fullName - fullname of this folder
separator - the default separator character for this folder's namespace
store - the Store
isNamespace
Method Detail

addACL

public void addACL(ACL acl)
            throws MessagingException
Add an access control list entry to the access control list for this folder.

Parameters:
acl - the access control list entry to add
Throws:
MessagingException - if the server doesn't support the ACL extension

addMessages

public synchronized Message[] addMessages(Message[] msgs)
                                   throws MessagingException
Append the given messages into this folder. Return array of Message objects representing the messages in the destination folder. Note that the folder must be open. Each element of the returned array corresponds to an element of the msgs array. A null element means the server didn't return UID information for the appended message.

Depends on the APPENDUID response code defined by the UIDPLUS extension - RFC 2359.

Parameters:
msgs
Throws:
MessagingException

addRights

public void addRights(ACL acl)
               throws MessagingException
Add the rights specified in the ACL to the entry for the identifier specified in the ACL. If an entry for the identifier doesn't already exist, add one.

Parameters:
acl - the identifer and rights to add
Throws:
MessagingException - if the server doesn't support the ACL extension

appendMessages

public synchronized void appendMessages(Message[] msgs)
                                 throws MessagingException
Append the given messages into this folder.

Overrides:
appendMessages in class Folder
Parameters:
msgs
Throws:
MessagingException

appendUIDMessages

public synchronized AppendUID[] appendUIDMessages(Message[] msgs)
                                           throws MessagingException
Append the given messages into this folder. Return array of AppendUID objects containing UIDs of these messages in the destination folder. Each element of the returned array corresponds to an element of the msgs array. A null element means the server didn't return UID information for the appended message.

Depends on the APPENDUID response code defined by the UIDPLUS extension - RFC 2359.

Parameters:
msgs
Throws:
MessagingException

close

public synchronized void close(boolean expunge)
                        throws MessagingException
Close this folder.

Overrides:
close in class Folder
Parameters:
expunge
Throws:
MessagingException

copyMessages

public synchronized void copyMessages(Message[] msgs,
                                      Folder folder)
                               throws MessagingException
Copy the specified messages from this folder, to the specified destination.

Overrides:
copyMessages in class Folder
Parameters:
msgs
folder
Throws:
MessagingException

create

public synchronized boolean create(int type)
                            throws MessagingException
Create this folder, with the specified type.

Overrides:
create in class Folder
Parameters:
type
Throws:
MessagingException

delete

public synchronized boolean delete(boolean recurse)
                            throws MessagingException
Delete this folder.

Overrides:
delete in class Folder
Parameters:
recurse
Throws:
MessagingException

doCommand

public Object doCommand(IMAPFolder.ProtocolCommand cmd)
                 throws MessagingException
Execute a user-supplied IMAP command. The command is executed in the appropriate context with the necessary locks held and using the appropriate IMAPProtocol object.

This method returns whatever the ProtocolCommand object's doCommand method returns. If the doCommand method throws a ConnectionException it is translated into a StoreClosedException or FolderClosedException as appropriate. If the doCommand method throws a ProtocolException it is translated into a MessagingException.

The following example shows how to execute the IMAP NOOP command. Executing more complex IMAP commands requires intimate knowledge of the com.sun.mail.iap and com.sun.mail.imap.protocol packages, best acquired by reading the source code.

 import com.sun.mail.iap.*;
 import com.sun.mail.imap.*;
 import com.sun.mail.imap.protocol.*;

 ...

 IMAPFolder f = (IMAPFolder)folder;
 Object val = f.doCommand(new IMAPFolder.ProtocolCommand() {
	public Object doCommand(IMAPProtocol p)
			throws ProtocolException {
	    p.simpleCommand("NOOP", null);
	    return null;
	}
 });
 

Here's a more complex example showing how to use the proposed IMAP SORT extension:

import com.sun.mail.iap.*; import com.sun.mail.imap.*; import com.sun.mail.imap.protocol.*; ... IMAPFolder f = (IMAPFolder)folder; Object val = f.doCommand(new IMAPFolder.ProtocolCommand() { public Object doCommand(IMAPProtocol p) throws ProtocolException { // Issue command Argument args = new Argument(); Argument list = new Argument(); list.writeString("SUBJECT"); args.writeArgument(list); args.writeString("UTF-8"); args.writeString("ALL"); Response[] r = p.command("SORT", args); Response response = r[r.length-1]; // Grab response Vector v = new Vector(); if (response.isOK()) { // command succesful for (int i = 0, len = r.length; i < len; i++) { if (!(r[i] instanceof IMAPResponse)) continue; IMAPResponse ir = (IMAPResponse)r[i]; if (ir.keyEquals("SORT")) { String num; while ((num = ir.readAtomString()) != null) System.out.println(num); r[i] = null; } } } // dispatch remaining untagged responses p.notifyResponseHandlers(r); p.handleResult(response); return null; } });

Parameters:
cmd
Throws:
MessagingException

doCommandIgnoreFailure

public Object doCommandIgnoreFailure(IMAPFolder.ProtocolCommand cmd)
                              throws MessagingException
Parameters:
cmd
Throws:
MessagingException

doOptionalCommand

public Object doOptionalCommand(String err,
                                IMAPFolder.ProtocolCommand cmd)
                         throws MessagingException
Parameters:
err
cmd
Throws:
MessagingException

doProtocolCommand

protected Object doProtocolCommand(IMAPFolder.ProtocolCommand cmd)
                            throws ProtocolException
Parameters:
cmd
Throws:
ProtocolException

exists

public synchronized boolean exists()
                            throws MessagingException
Check whether this folder really exists on the server.

Overrides:
exists in class Folder
Throws:
MessagingException

expunge

public synchronized Message[] expunge()
                               throws MessagingException
Expunge all messages marked as DELETED.

Overrides:
expunge in class Folder
Throws:
MessagingException

expunge

public synchronized Message[] expunge(Message[] msgs)
                               throws MessagingException
Expunge the indicated messages, which must have been marked as DELETED.

Parameters:
msgs
Throws:
MessagingException

fetch

public synchronized void fetch(Message[] msgs,
                               FetchProfile fp)
                        throws MessagingException
Prefetch attributes, based on the given FetchProfile.

Overrides:
fetch in class Folder
Parameters:
msgs
fp
Throws:
MessagingException

forceClose

public synchronized void forceClose()
                             throws MessagingException
Close this folder without waiting for the server.

Throws:
MessagingException

getACL

public ACL[] getACL()
             throws MessagingException
Get the access control list entries for this folder.

Returns:
array of access control list entries
Throws:
MessagingException - if the server doesn't support the ACL extension

getAttributes

public String[] getAttributes()
                       throws MessagingException
Get the attributes that the IMAP server returns with the LIST response.

Throws:
MessagingException

getDeletedMessageCount

public synchronized int getDeletedMessageCount()
                                        throws MessagingException
Get the deleted message count.

Overrides:
getDeletedMessageCount in class Folder
Throws:
MessagingException

getFolder

public Folder getFolder(String name)
                 throws MessagingException
Get the named subfolder.

Overrides:
getFolder in class Folder
Parameters:
name
Throws:
MessagingException

getFullName

public synchronized String getFullName()
Get the fullname of this folder.

Overrides:
getFullName in class Folder

getMessage

public synchronized Message getMessage(int msgnum)
                                throws MessagingException
Get the specified message.

Overrides:
getMessage in class Folder
Parameters:
msgnum
Throws:
MessagingException

getMessageByUID

public synchronized Message getMessageByUID(long uid)
                                     throws MessagingException
Get the Message corresponding to the given UID. If no such message exists, null is returned.

Parameters:
uid
Throws:
MessagingException

getMessageCount

public synchronized int getMessageCount()
                                 throws MessagingException
Get the total message count.

Overrides:
getMessageCount in class Folder
Throws:
MessagingException

getMessagesByUID

public synchronized Message[] getMessagesByUID(long start,
                                               long end)
                                        throws MessagingException
Get the Messages specified by the given range.

Returns Message objects for all valid messages in this range. Returns an empty array if no messages are found.

Parameters:
start
end
Throws:
MessagingException

getMessagesByUID

public synchronized Message[] getMessagesByUID(long[] uids)
                                        throws MessagingException
Get the Messages specified by the given array.

uids.length() elements are returned. If any UID in the array is invalid, a null entry is returned for that element.

Parameters:
uids
Throws:
MessagingException

getName

public synchronized String getName()
Get the name of this folder.

Overrides:
getName in class Folder

getNewMessageCount

public synchronized int getNewMessageCount()
                                    throws MessagingException
Get the new message count.

Overrides:
getNewMessageCount in class Folder
Throws:
MessagingException

getParent

public synchronized Folder getParent()
                              throws MessagingException
Get this folder's parent.

Overrides:
getParent in class Folder
Throws:
MessagingException

getPermanentFlags

public synchronized Flags getPermanentFlags()
Return the permanent flags supported by the server.

Overrides:
getPermanentFlags in class Folder

getQuota

public Quota[] getQuota()
                 throws MessagingException
Get the quotas for the quotaroot associated with this folder. Note that many folders may have the same quotaroot. Quotas are controlled on the basis of a quotaroot, not (necessarily) a folder. The relationship between folders and quotaroots depends on the IMAP server. Some servers might implement a single quotaroot for all folders owned by a user. Other servers might implement a separate quotaroot for each folder. A single folder can even have multiple quotaroots, perhaps controlling quotas for different resources.

Returns:
array of Quota objects for the quotaroots associated with this folder
Throws:
MessagingException - if the server doesn't support the QUOTA extension

getSeparator

public synchronized char getSeparator()
                               throws MessagingException
Get the separator character.

Overrides:
getSeparator in class Folder
Throws:
MessagingException

getStoreProtocol

protected synchronized IMAPProtocol getStoreProtocol()
                                              throws ProtocolException
Get this folder's Store's protocol connection. When acquiring a store protocol object, it is important to use the following steps: IMAPProtocol p = null; try { p = getStoreProtocol(); // perform the command } catch (WhateverException ex) { // handle it } finally { releaseStoreProtocol(p); }

Throws:
ProtocolException

getType

public synchronized int getType()
                         throws MessagingException
Get the type of this folder.

Overrides:
getType in class Folder
Throws:
MessagingException

getUID

public synchronized long getUID(Message message)
                         throws MessagingException
Get the UID for the specified message.

Parameters:
message
Throws:
MessagingException

getUIDNext

public synchronized long getUIDNext()
                             throws MessagingException
Returns the predicted UID that will be assigned to the next message that is appended to this folder. If the folder is closed, the STATUS command is used to retrieve this value. If the folder is open, the value returned from the SELECT or EXAMINE command is returned. Note that messages may have been appended to the folder while it was open and thus this value may be out of date.

Servers implementing RFC2060 likely won't return this value when a folder is opened. Servers implementing RFC3501 should return this value when a folder is opened.

Returns:
the UIDNEXT value, or -1 if unknown
Throws:
MessagingException

getUIDValidity

public synchronized long getUIDValidity()
                                 throws MessagingException
Returns the UIDValidity for this folder.

Throws:
MessagingException

getUnreadMessageCount

public synchronized int getUnreadMessageCount()
                                       throws MessagingException
Get the unread message count.

Overrides:
getUnreadMessageCount in class Folder
Throws:
MessagingException

handleResponse

public void handleResponse(Response r)
The response handler. This is the callback routine that is invoked by the protocol layer.

Parameters:
r

hasNewMessages

public synchronized boolean hasNewMessages()
                                    throws MessagingException
Check whether this folder has new messages.

Overrides:
hasNewMessages in class Folder
Throws:
MessagingException

idle

public void idle()
          throws MessagingException
Use the IMAP IDLE command (see RFC 2177), if supported by the server, to enter idle mode so that the server can send unsolicited notifications of new messages arriving, etc. without the need for the client to constantly poll the server. Use an appropriate listener to be notified of new messages or other events. When another thread (e.g., the listener thread) needs to issue an IMAP comand for this folder, the idle mode will be terminated and this method will return. Typically the caller will invoke this method in a loop.

The mail.imap.minidletime property enforces a minimum delay before returning from this method, to ensure that other threads have a chance to issue commands before the caller invokes this method again. The default delay is 10 milliseconds.

Throws:
MessagingException - if the server doesn't support the IDLE extension

isOpen

public synchronized boolean isOpen()
Check whether this connection is really open.

Overrides:
isOpen in class Folder

isSubscribed

public synchronized boolean isSubscribed()
Check whether this folder is subscribed.

Overrides:
isSubscribed in class Folder

list

public Folder[] list(String pattern)
              throws MessagingException
List all subfolders matching the specified pattern.

Overrides:
list in class Folder
Parameters:
pattern
Throws:
MessagingException

listRights

public Rights[] listRights(String name)
                    throws MessagingException
Get all the rights that may be allowed to the given identifier. Rights are grouped per RFC 2086 and each group is returned as an element of the array. The first element of the array is the set of rights that are always granted to the identifier. Later elements are rights that may be optionally granted to the identifier.

Note that this method lists the rights that it is possible to assign to the given identifier, not the rights that are actually granted to the given identifier. For the latter, see the getACL method.

Parameters:
name - the identifier to list rights for
Returns:
array of Rights objects representing possible rights for the identifier
Throws:
MessagingException - if the server doesn't support the ACL extension

listSubscribed

public Folder[] listSubscribed(String pattern)
                        throws MessagingException
List all subscribed subfolders matching the specified pattern.

Overrides:
listSubscribed in class Folder
Parameters:
pattern
Throws:
MessagingException

myRights

public Rights myRights()
                throws MessagingException
Get the rights allowed to the currently authenticated user.

Returns:
the rights granted to the current user
Throws:
MessagingException - if the server doesn't support the ACL extension

open

public synchronized void open(int mode)
                       throws MessagingException
Open this folder in the given mode.

Overrides:
open in class Folder
Parameters:
mode
Throws:
MessagingException

releaseStoreProtocol

protected synchronized void releaseStoreProtocol(IMAPProtocol p)
Release the store protocol object. If we borrowed a protocol object from the connection pool, give it back. If we used our own protocol object, nothing to do.

Parameters:
p

removeACL

public void removeACL(String name)
               throws MessagingException
Remove any access control list entry for the given identifier from the access control list for this folder.

Parameters:
name - the identifier for which to remove all ACL entries
Throws:
MessagingException - if the server doesn't support the ACL extension

removeRights

public void removeRights(ACL acl)
                  throws MessagingException
Remove the rights specified in the ACL from the entry for the identifier specified in the ACL.

Parameters:
acl - the identifer and rights to remove
Throws:
MessagingException - if the server doesn't support the ACL extension

renameTo

public synchronized boolean renameTo(Folder f)
                              throws MessagingException
Rename this folder.

Overrides:
renameTo in class Folder
Parameters:
f
Throws:
MessagingException

search

public synchronized Message[] search(SearchTerm term)
                              throws MessagingException
Search whole folder for messages matching the given term.

Overrides:
search in class Folder
Parameters:
term
Throws:
MessagingException

search

public synchronized Message[] search(SearchTerm term,
                                     Message[] msgs)
                              throws MessagingException
Search the folder for messages matching the given term. Returns array of matching messages. Returns an empty array if no matching messages are found.

Overrides:
search in class Folder
Parameters:
term
msgs
Throws:
MessagingException

setFlags

public synchronized void setFlags(Message[] msgs,
                                  Flags flag,
                                  boolean value)
                           throws MessagingException
Set the specified flags for the given array of messages.

Overrides:
setFlags in class Folder
Parameters:
msgs
flag
value
Throws:
MessagingException

setQuota

public void setQuota(Quota quota)
              throws MessagingException
Set the quotas for the quotaroot specified in the quota argument. Typically this will be one of the quotaroots associated with this folder, as obtained from the getQuota method, but it need not be.

Parameters:
quota - the quota to set
Throws:
MessagingException - if the server doesn't support the QUOTA extension

setSubscribed

public synchronized void setSubscribed(boolean subscribe)
                                throws MessagingException
Subscribe/Unsubscribe this folder.

Overrides:
setSubscribed in class Folder
Parameters:
subscribe
Throws:
MessagingException


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention. The official Sun™ documentation can be found here at http://java.sun.com/products/javamail/javadocs/index.html.