Table of Contents

OIL2 Class Standard.SendMailViaSMTP


class Standard . SendMailViaSMTP {
        oid     connObj;
        string  fromAddress;
        string  fromName;
        any     mailBody;
        any     notifyObj;
        int32   result;
        string  smtpAddr;
        string  subjectText;
        oid     timerObj;
        array   toNames;
inherits from Object;

DESCRIPTION

A convenience class for sending SMTP-based email.

METHODS


Standard.SendMailViaSMTP:create

SendMailViaSMTP:create(any fromAddrInfo, array receipients, string subject, any message, optional oid notifyWhenDone, optional string viaPort)

Method Description

The create method takes a minimum of 4 arguments.

fromAddrInfo
The email address from which the mail message should appear to have been sent (e.g., "webmaster@domain.com")
receipients
An array of email addresses to which the note should be sent. Each element of the array is a string corresponding to one user's email address (e.g., "user@domain.com")
subject
The subject of the email note
message
The body of the email note, which can be specified as either a string or a set of strings
notifyWhenDone
an optional argument that specifies the object Id of an object to which a smtpResult message should be sent when the email note has been sent.
viaPort
an optional override of the address used to connect to a SMTP daemon. By default, this is "tcp:127.0.0.1:25,c"