パッケージ com.sun.mail.imap

IMAP メッセージ ストアへのアクセスを提供する JavaMail API の IMAP プロトコル プロバイダです。

参照先:
          説明

インタフェースの概要
IMAPFolder.ProtocolCommand ユーザ定義用 IMAP プロトコルコマンドのシンプルなインターフェイスです。
Utility.Condition このインタフェースは、toMessageSet() で実行する為の test を定義します。
 

クラスの概要
ACL 特定の認証識別子(ユーザ又はグループ)の為のアクセスコントロールリストエントリです。
AppendUID  
DefaultFolder  
IMAPBodyPart  
IMAPFolder このクラスは IMAP フォルダを実装します。
IMAPFolder.FetchProfileItem フェッチされるヘッダ群のフェッチプロフィール項目です。
IMAPInputStream このクラスの実装は IMAP データストリームです。
IMAPMessage このクラスはIMAPMessageオブジェクトを実装します。
IMAPMultipartDataSource  
IMAPNestedMessage このクラスは入れ子にされたIMAPメッセージを実装します。
IMAPSSLStore このクラスは SSL 上の IMAP メッセージストアへのアクセスを提供します。
IMAPStore このクラスは IMAP メッセージストアへのアクセスを提供します。
Rights Rights クラスは認証識別子(例えば、ユーザやグループ)への権利セットを表します。
Rights.Right このインナークラスは個々の権限を表します。
Utility  
 

パッケージ com.sun.mail.imap の説明

IMAP メッセージ ストアへのアクセスを提供する JavaMail API の IMAP プロトコル プロバイダです。 IMAP4 と IMAP4rev1 プロトコルの両方をサポートします。 詳細については、RFC 2060 を参照して下さい。

IMAP プロトコルプロバイダは、J2SE 5.0 等の様に javax.security.sasl APIをサポートするシステム上で SASL (RFC2222) 認証メカニズムを使用する事ができます。 又、SASL 実装が組み込まれる SASL メカニズムに加えて、ユーザは、カスタム認証スキーマをサポートする為のデザインの追加 SASL メカニズムを提供する事ができます。 詳細に関して Java SASL API プログラミングと開発者ガイドを参照して下さい。 現在の実装は提供される SASL メカニズムにそれら自身の保全か守秘性レイヤをサポートしない事に注意して下さい。

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.

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.

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.

The IMAP protocol provider supports the following properties, which may be set in the JavaMail Session object. The properties are always set as strings; the Type column describes how the string is interpreted. 使用例

        props.put("mail.imap.port", "888");
mail.imap.port のプロパティを設定します。(int 型のプロパティ)

名前 説明
mail.imap.user String IMAP のデフォルトユーザ名です。
mail.imap.host String 接続する IMAP サーバ名です。
mail.imap.port int The IMAP server port to connect to, if the connect() method doesn't explicitly specify one. デフォルトは 143 です。
mail.imap.partialfetch boolean IMAP partial-fetch 機能を使用するかどうかを制御します。 デフォルトは true です。
mail.imap.fetchsize int partial-fetch サイズ(バイト) デフォルトは 16K バイトです
mail.imap.connectiontimeout int ソケット接続タイムアウト値(ミリ秒)です。 デフォルトは無限(タイムアウトしない)です。
mail.imap.timeout int ソケット I/O タイムアウト値(ミリ秒)です。 デフォルトは無限(タイムアウトしない)です。
mail.imap.statuscachetimeout int STATUS コマンドレスポンスのキャッシュのタイムアウト(ミリ秒)です。 デフォルトは 1000 (1 分)です。 キャッシュを無効にするには 0 を設定します。
mail.imap.appendbuffersize int IMAP フォルダに追加する時にメモリでバッファリングするメッセージの最大サイズ。 値を設定しない、又は -1 を設定した場合は上限値はありません、全てのメッセージがバッファリングされます。 0 に設定された場合、メッセージはバッファリングされません。 (例えば) 8192 に設定された場合、8K バイト以下のメッセージはバッファリングされて、より大きいメッセージはバッファリングされません。 バッファリングは短期間メモリ使用量を犠牲にしてCPU使用時間を節約します。 一般的に非常に大きいメッセージを IMAP メールボックスに追加する場合、適度の値(1M以下)に設定して下さい。
mail.imap.connectionpoolsize int Maximum number of available connections in the connection pool. デフォルトは 1 です。
mail.imap.connectionpooltimeout int 接続プールのタイムアウト値(ミリ秒)。 デフォルトは 45000 (45 分)です。
mail.imap.separatestoreconnection boolean Flag to indicate whether to use a dedicated store connection for store commands. デフォルトは false です。
mail.imap.allowreadonlyselect boolean 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 getMode method on the Folder object will return Folder.READ_ONLY in this case even though the open method specified Folder.READ_WRITE. デフォルトは false です。
mail.imap.auth.login.disable boolean If true, prevents use of the non-standard AUTHENTICATE LOGIN command, instead using the plain LOGIN command. デフォルトは false です。
mail.imap.auth.plain.disable boolean true の場合、AUTHENTICATE PLAIN コマンドの使用を防ぎます。 デフォルトは false です。
mail.imap.starttls.enable boolean If true, enables the use of the STARTTLS command (if supported by the server) to switch the connection to a TLS-protected connection before issuing any login commands. Note that an appropriate trust store must configured so that the client will trust the server's certificate. This feature only works on J2SE 1.4 and newer systems. デフォルトは false です。
mail.imap.localaddress String Local address (host name) to bind to when creating the IMAP socket. Defaults to the address picked by the Socket class. Should not normally need to be set, but useful with multi-homed hosts where it's important to pick a particular local address to bind to.
mail.imap.localport int Local port number to bind to when creating the IMAP socket. Defaults to the port number picked by the Socket class.
mail.imap.sasl.enable boolean If set to true, attempt to use the javax.security.sasl package to choose an authentication mechanism for login. デフォルトは false です。
mail.imap.sasl.mechanisms String A space or comma separated list of SASL mechanism names to try to use.
mail.imap.sasl.authorizationid String The authorization ID to use in the SASL authentication. If not set, the authetication ID (user name) is used.
mail.imap.socketFactory.class String If set, specifies the name of a class that implements the javax.net.SocketFactory interface. This class will be used to create IMAP sockets.
mail.imap.socketFactory.fallback boolean If set to true, failure to create a socket using the specified socket factory class will cause the socket to be created using the java.net.Socket class. デフォルトは true です。
mail.imap.socketFactory.port int Specifies the port to connect to when using the specified socket factory. If not set, the default port will be used.

Live Z 版 JavaMail では以下のプロパティが独自に追加されています。

名前 説明
mail.imap.folder.charset String IMAP フォルダでRFC準拠のBASE64エンコーディングを使用せずに、 キャラクタセットによるエンコーディングを行う場合に、 エンコーディングに使用するキャラクタセット名を指定します。

一般的には、アプリケーションはこのパッケージ中のクラスを直接使用する必要はないはずです。 代わりに javax.mail パッケージ(とサブパッケージ)で定義された API を使用すべきです。 アプリケーションは IMAPStore 又は IMAPFolder のインスタンスを決して直接構成するべきではありません。 代わりに適切な Folder オブジェクトを入手する SessiongetStore メソッドを使用すべきです。

警告: このパッケージのユニークな API は実験的であると考えるべきです。 将来、現在の API を使用するアプリケーションと両立しない方法でそれらを変えるかもしれません。