0

Quartz スケジューラーで SendMailJob クラスを使用して支援を求めています。私は有用なドキュメントを見つけることができず、Web アプリからオンデマンドで大量のメールを送信するためにそれを実装する「正しい」方法を理解することができませんでした (プロセスがサーブレットの継続に依存しないように)電子メール ジョブのライフサイクル全体に存在します)

4

1 に答える 1

-1

このクラスは、メールを送信するための非常に基本的なオプションを提供します。アプリケーションとより統合される独自のクラスをより適切に書き直す必要があります。SendMailJob実例と同じくらい実例として存在しているようです...

いずれにせよ、それを使用したい場合は、メールを送信するためにJobDataマップに次のパラメーターを入力する必要があります。詳細が必要な場合は、このクラスのソースコードをご覧ください。

/**
 * The host name of the smtp server. REQUIRED.
 */
public static final String PROP_SMTP_HOST = "smtp_host";

/**
 * The e-mail address to send the mail to. REQUIRED.
 */
public static final String PROP_RECIPIENT = "recipient";

/**
 * The e-mail address to cc the mail to. Optional.
 */
public static final String PROP_CC_RECIPIENT = "cc_recipient";

/**
 * The e-mail address to claim the mail is from. REQUIRED.
 */
public static final String PROP_SENDER = "sender";

/**
 * The e-mail address the message should say to reply to. Optional.
 */
public static final String PROP_REPLY_TO = "reply_to";

/**
 * The subject to place on the e-mail. REQUIRED.
 */
public static final String PROP_SUBJECT = "subject";

/**
 * The e-mail message body. REQUIRED.
 */
public static final String PROP_MESSAGE = "message";

/**
 * The message content type. For example, "text/html". Optional.
 */
public static final String PROP_CONTENT_TYPE = "content_type";
于 2012-09-24T13:43:57.977 に答える