<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Wed Jun 25 00:04:05 PDT 2003 -->
<TITLE>
JavaMail API documentation: Package com.sun.mail.imap
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
</HEAD>
<BODY BGCOLOR="white">

<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-use.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV PACKAGE&nbsp;
&nbsp;<A HREF="../../../../com/sun/mail/pop3/package-summary.html"><B>NEXT PACKAGE</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="package-summary.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>
<H2>
Package com.sun.mail.imap
</H2>
An IMAP protocol provider for the JavaMail API
that provides access to an IMAP message store.
<P>
<B>See: </B>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="#package_description"><B>Description</B></A>
<P>

<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Interface Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="IMAPFolder.ProtocolCommand.html"><I>IMAPFolder.ProtocolCommand</I></A></B></TD>
<TD>A simple interface for user-defined IMAP protocol commands.</TD>
</TR>
</TABLE>
&nbsp;

<P>

<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Class Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="ACL.html">ACL</A></B></TD>
<TD>An access control list entry for a particular authentication identifier
 (user or group).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="IMAPFolder.html">IMAPFolder</A></B></TD>
<TD>This class implements an IMAP folder.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="IMAPFolder.FetchProfileItem.html">IMAPFolder.FetchProfileItem</A></B></TD>
<TD>A fetch profile item for fetching headers.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="IMAPStore.html">IMAPStore</A></B></TD>
<TD>This class provides access to an IMAP message store.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="Quota.html">Quota</A></B></TD>
<TD>This class represents a set of quotas for a given quota root.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="Quota.Resource.html">Quota.Resource</A></B></TD>
<TD>An individual resource in a quota root.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="Rights.html">Rights</A></B></TD>
<TD>The Rights class represents the set of rights for an authentication
 identifier (for instance, a user or a group).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="Rights.Right.html">Rights.Right</A></B></TD>
<TD>This inner class represents an individual right.</TD>
</TR>
</TABLE>
&nbsp;

<P>
<A NAME="package_description"><!-- --></A><H2>
Package com.sun.mail.imap Description
</H2>

<P>
An IMAP protocol provider for the JavaMail API
that provides access to an IMAP message store.
Both the IMAP4 and IMAP4rev1 protocols are supported.
Refer to <A HREF="http://www.ietf.org/rfc/rfc2060.txt">RFC 2060</A>
for more information.
<P>
A connected IMAPStore maintains a pool of IMAP protocol objects for
use in communicating with the IMAP server. The IMAPStore will create
the initial AUTHENTICATED connection and seed the pool with this
connection. As folders are opened and new IMAP protocol objects are
needed, the IMAPStore will provide them from the connection pool,
or create them if none are available. When a folder is closed,
its IMAP protocol object is returned to the connection pool if the
pool is not over capacity.
<P>
A mechanism is provided for timing out idle connection pool IMAP
protocol objects. Timed out connections are closed and removed (pruned)
from the connection pool.
<P>
The connected IMAPStore object may or may not maintain a separate IMAP
protocol object that provides the store a dedicated connection to the
IMAP server. This is provided mainly for compatibility with previous
implementations of the IMAP protocol provider.
<P>
The IMAP protocol provider supports the following properties,
which may be set in the JavaMail <code>Session</code> object.
The properties are always set as strings; the Type column describes
how the string is interpreted.  For example, use
<PRE>
	props.put("mail.imap.port", "888");
</PRE>
to set the <CODE>mail.imap.port</CODE> property, which is of type int.
<P>
<TABLE BORDER>
<TR>
<TH>Name</TH>
<TH>Type</TH>
<TH>Description</TH>
</TR>

<TR>
<TD>mail.imap.user</TD>
<TD>String</TD>
<TD>Default user name for IMAP.</TD>
</TR>

<TR>
<TD>mail.imap.host</TD>
<TD>String</TD>
<TD>The IMAP server to connect to.</TD>
</TR>

<TR>
<TD>mail.imap.port</TD>
<TD>int</TD>
<TD>The IMAP server port to connect to, if the connect() method doesn't
explicitly specify one. Defaults to 143.</TD>
</TR>

<TR>
<TD>mail.imap.partialfetch</TD>
<TD>boolean</TD>
<TD>Controls whether the IMAP partial-fetch capability should be used.
Defaults to true.</TD>
</TR>

<TR>
<TD>mail.imap.fetchsize</TD>
<TD>int</TD>
<TD>Partial fetch size in bytes. Defaults to 16K.</TD>
</TR>

<TR>
<TD>mail.imap.connectiontimeout</TD>
<TD>int</TD>
<TD>Socket connection timeout value in milliseconds.
Default is infinite timeout.</TD>
</TR>

<TR>
<TD>mail.imap.timeout</TD>
<TD>int</TD>
<TD>Socket I/O timeout value in milliseconds.  Default is infinite timeout.</TD>
</TR>

<TR>
<TD>mail.imap.statuscachetimeout</TD>
<TD>int</TD>
<TD>Timeout value in milliseconds for cache of STATUS command response.
Default is 1000 (1 second).  Zero disables cache.</TD>
</TR>

<TR>
<TD>mail.imap.appendbuffersize</TD>
<TD>int</TD>
<TD>
Maximum size of a message to buffer in memory when appending to an IMAP
folder.  If not set, or set to -1, there is no maximum and all messages
are buffered.  If set to 0, no messages are buffered.  If set to (e.g.)
8192, messages of 8K bytes or less are buffered, larger messages are
not buffered.  Buffering saves cpu time at the expense of short term
memory usage.  If you commonly append very large messages to IMAP
mailboxes you might want to set this to a moderate value (1M or less).
</TD>
</TR>

<TR>
<TD>mail.imap.connectionpoolsize</TD>
<TD>int</TD>
<TD>Maximum number of available connections in the connection pool.
Default is 1.</TD>
</TR>

<TR>
<TD>mail.imap.connectionpooltimeout</TD>
<TD>int</TD>
<TD>Timeout value in milliseconds for connection pool connections.  Default
is 45000 (45 seconds).</TD>
</TR>

<TR>
<TD>mail.imap.separatestoreconnection</TD>
<TD>boolean</TD>
<TD>Flag to indicate whether to use a dedicated store connection for store
commands.  Default is false.</TD>
</TR>

<TR>
<TD>mail.imap.allowreadonlyselect</TD>
<TD>boolean</TD>
<TD>If false, attempts to open a folder read/write will fail
if the SELECT command succeeds but indicates that the folder is READ-ONLY.
This sometimes indicates that the folder contents can'tbe changed, but
the flags are per-user and can be changed, such as might be the case for
public shared folders.  If true, such open attempts will succeed, allowing
the flags to be changed.  The <code>getMode</code> method on the
<code>Folder</code> object will return <code>Folder.READ_ONLY</code>
in this case even though the <code>open</code> method specified
<code>Folder.READ_WRITE</code>.  Default is false.</TD>
</TR>

<TR>
<TD>mail.imap.auth.login.disable</TD>
<TD>boolean</TD>
<TD>If true, prevents use of the non-standard <code>AUTHENTICATE LOGIN</code>
command, instead using the plain <code>LOGIN</code> command.
Default is false.</TD>
</TR>
</TABLE>
<P>
In general, applications should not need to use the classes in this
package directly.  Instead, they should use the APIs defined by
<code>javax.mail</code> package (and subpackages).  Applications should
never construct instances of <code>IMAPStore</code> or
<code>IMAPFolder</code> directly.  Instead, they should use the
<code>Session</code> method <code>getStore</code> to acquire an
appropriate <code>Store</code> object, and from that acquire
<code>Folder</code> objects.
<P>
<strong>WARNING:</strong> The APIs unique to this package should be
considered <strong>EXPERIMENTAL</strong>.  They may be changed in the
future in ways that are incompatible with applications using the
current APIs.
<P>
<HR>

<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-use.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV PACKAGE&nbsp;
&nbsp;<A HREF="../../../../com/sun/mail/pop3/package-summary.html"><B>NEXT PACKAGE</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="package-summary.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>

</BODY>
</HTML>
