|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
java.lang.Objectjavax.mail.Message
javax.mail.internet.MimeMessage
com.sun.mail.smtp.SMTPMessage
public final class SMTPMessage
このクラスは様々な SMTP オプションを指定させる MimeMessage クラスと、 このメッセージを SMTP 上に送信する時に使用するパラメータです。 単に MimeMessage の代わりにこのクラスを使用します。 そして、このクラスのメソッドを使用して SMTP オプションを設定します。
SMTP プロトコルプロバイダの詳細に関しては、 jp.sourceforge.livez.mail.smtp パッケージのドキュメンテーションを参照して下さい。
MimeMessage| 入れ子のクラスの概要 |
|---|
| クラス javax.mail.internet.MimeMessage から継承された入れ子のクラス/インタフェース |
|---|
MimeMessage.RecipientType |
| フィールドの概要 | |
|---|---|
static int |
NOTIFY_DELAY
配信遅延を通知します。 |
static int |
NOTIFY_FAILURE
配信失敗を通知します。 |
static int |
NOTIFY_NEVER
配信状況を通知しない事を表します。 |
static int |
NOTIFY_SUCCESS
配信成功を通知します。 |
static int |
RETURN_FULL
配信状況通知と共に完全なメッセージを返す事を表します。 |
static int |
RETURN_HDRS
配信状況通知と共にメッセージヘッダだけを返す事を表します。 |
| クラス javax.mail.internet.MimeMessage から継承されたフィールド |
|---|
content, contentStream, dh, flags, headers, modified, saved |
| クラス javax.mail.Message から継承されたフィールド |
|---|
expunged, folder, msgnum, session |
| インタフェース javax.mail.Part から継承されたフィールド |
|---|
ATTACHMENT, INLINE |
| コンストラクタの概要 | |
|---|---|
SMTPMessage(MimeMessage source)
source MimeMessage から初期化された内容を持つ新しい SMTPMessage を構築します。 |
|
SMTPMessage(Session session)
デフォルトコンストラクタです。 |
|
SMTPMessage(Session session,
InputStream is)
指定された MIME InputStream のデータを読み取り、構文解析することで、SMTPMessage を構築します。 |
|
| メソッドの概要 | |
|---|---|
boolean |
getAllow8bitMIME()
Is use of the 8BITMIME extension is allowed? |
String |
getEnvelopeFrom()
エンベロープ From アドレスを返します。 |
String |
getMailExtension()
Gets the extension string to use with the MAIL command. |
int |
getNotifyOptions()
通知オプションを取得します。 |
int |
getReturnOption()
リターンオプションを返します。 |
boolean |
getSendPartial()
Send message if some addresses are invalid? |
String |
getSubmitter()
Gets the submitter to be used for the RFC 2554 AUTH= value in the MAIL FROM command. |
void |
setAllow8bitMIME(boolean allow)
If set to true, and the server supports the 8BITMIME extension, text parts of this message that use the "quoted-printable" or "base64" encodings are converted to use "8bit" encoding if they follow the RFC 2045 rules for 8bit text. |
void |
setEnvelopeFrom(String from)
From アドレスに SMTP エンベロープが現れるように設定します。 |
void |
setMailExtension(String extension)
Set the extension string to use with the MAIL command. |
void |
setNotifyOptions(int options)
サーバが配信状況通知をサポートする場合、通知オプションに使用される様に設定します。 |
void |
setReturnOption(int option)
サーバが配信状況通知をサポートする場合、リターンオプションに使用される様に設定します。 |
void |
setSendPartial(boolean partial)
If set to true, and this message has some valid and some invalid addresses, send the message anyway, reporting the partial failure with a SendFailedException. |
void |
setSubmitter(String submitter)
Sets the submitter to be used for the RFC 2554 AUTH= value in the MAIL FROM command. |
| クラス javax.mail.Message から継承されたメソッド |
|---|
addRecipient, getFolder, getMessageNumber, isExpunged, match, setExpunged, setFlag, setMessageNumber, setRecipient |
| クラス java.lang.Object から継承されたメソッド |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| フィールドの詳細 |
|---|
public static final int NOTIFY_NEVER
public static final int NOTIFY_SUCCESS
public static final int NOTIFY_FAILURE
public static final int NOTIFY_DELAY
public static final int RETURN_FULL
public static final int RETURN_HDRS
| コンストラクタの詳細 |
|---|
public SMTPMessage(Session session)
headers フィールドは空の InternetHeaders オブジェクトに設定されます。
flags フィールドは空の Flags オブジェクトに設定されます。
modified フラグは true に設定されます。
public SMTPMessage(Session session,
InputStream is)
throws MessagingException
session - このメッセージの Session オブジェクトis - メッセージ入力ストリーム
MessagingException
public SMTPMessage(MimeMessage source)
throws MessagingException
source MimeMessage から初期化された内容を持つ新しい SMTPMessage を構築します。
新しいメッセージは元のメッセージと独立しています。注: 現在の実装はどちらかというと非効率です。必要以上にデータのコピーを行います。
source - 内容のコピー元となるメッセージ
MessagingException| メソッドの詳細 |
|---|
public void setEnvelopeFrom(String from)
mail.smtp.from プロパティを無視して設定します。
from - エンベロープ From アドレスpublic String getEnvelopeFrom()
public void setNotifyOptions(int options)
NOTIFY_NEVER 又は
NOTIFY_SUCCESS、NOTIFY_FAILURE、
及び NOTIFY_DELAY の組み合わせのどちらか
mail.smtp.dsn.notify プロパティを無視して設定します。
options - 通知オプションpublic int getNotifyOptions()
public void setReturnOption(int option)
RETURN_FULL 又は RETURN_HDRS の何れか。
mail.smtp.dsn.ret プロパティを無視して設定します。
option - リターンオプションpublic int getReturnOption()
public void setAllow8bitMIME(boolean allow)
If true, overrides the mail.smtp.allow8bitmime property.
allow - 8ビット許可フラグpublic boolean getAllow8bitMIME()
public void setSendPartial(boolean partial)
If true, overrides the mail.smtp.sendpartial property.
partial - send partial flagpublic boolean getSendPartial()
public String getSubmitter()
public void setSubmitter(String submitter)
submitter - the name of the submitterpublic String getMailExtension()
public void setMailExtension(String extension)
For example:
if (smtpTransport.supportsExtension("DELIVERBY"))
smtpMsg.setMailExtension("BY=60;R");
|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||