import ws.*;

// Example of using WMail class on Passage Server

public class api_WMail
{
  public WTableList Request(WServer oServer, WParamList oParamList)
  { 
    int rc;
    String  szSub, szMsg;
    String[] recipients = new String[1];
    WTableList oTableList;
    WMail      oMail;

    oTableList = oServer.newTableList();
    oMail      = oServer.newMail();

    oMail.setContentType("text/html");
    oMail.setFrom("from@yourcompany.com");

    recipients[0] = "to@yourcompany.com";

    szSub = "subject...";
    szMsg = "message...";
    rc = oMail.send(recipients, szSub, szMsg);

    return oTableList; 
  }
}