sendEmail()

Send an e-mail message asynchronously.

Syntax

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

Parameters

message
The text of the e-mail message.
subject
The subject line of the e-mail message
recipients
A Vector that contains e-mail addresses of the message recipients. This vector contains String objects; multiple objects are separated by commas.

Notes

The sendEmail() method can send an e-mail message to the recipients specified in the recipients vector if:

Note:
The logError() method automatically sends an error message to an e-mail recipient (assuming that the Email collaboration and adapter are running). The sendEmail() method allows you to explicitly send an e-mail message.

Examples

// 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, 2005