sendEmail()

E メール・メッセージを非同期に送信します。

構文

void sendEmail(String message, String subject, Vector recipients)
 

パラメーター

message
E メール・メッセージの本文。

subject
E メール・メッセージの件名。

recipients
メッセージ宛先の E メール・アドレスを含む Vector。この Vector には String オブジェクトが含まれており、複数の String オブジェクトの場合はコンマで区切られています。

注記

sendEmail() メソッドは、以下の場合に、recipients ベクトルに指定された宛先に E メール・メッセージを送信できます。

注:
logError() メソッドは E メール宛先に自動的にエラー・メッセージを送信します (Email コラボレーションおよび Email アダプターは実行中と想定します)。sendEmail() メソッドは、E メール・メッセージを明示的に送信できるようにします。

// Initialize the Vector for the list of email addresses
 Vector emailList = new Vector();
  
 // Add as many email addresses as Strings to the Vector
 emailList.add("dbadmin@us.ibm.com, netadmin@us.ibm.com, 
      cwadmin@us.ibm.com");
  
 // Initialize the message and subject as Strings
 String message = "This is the body of the email";
 String subject = "This is the subject of the email";
  
 // Make the call to sendEmail()
 sendEmail(message, subject, emailList);
 

Copyright IBM Corp. 2004