SMTPSession Class Methods

In this section we describe the SMTPSession class methods. The methods are described in alphabetical order.

Syntax

Send(&Email)

Description

Use the Send method to send an MCFOutboundEmail object as email.

By default, the system sends the email to the SMTP server using the properties set in the application server configuration file. You can specify different setup parameters by supplying values for the SMTPSession object properties, such as Server, BackupServer, and so on.

Parameters

Field or Control

Definition

&Email

Specify an already instantiated MCFOutboundEMail object to be sent.

Returns

A constant indicating the status of the method. The values are:

Value

Description

%ObEmail_Delivered

The email was delivered.

%ObEmail_NotDelivered

Email delivery not attempted.

%ObEmail_PartiallyDelivered

The email was only partially delivered, that is, it was only delivered to some of the recipients.

%ObEmail_ FailedBeforeSending

The email wasn't delivered.

%ObEmail_ SentButResultUnknown

The email was sent but the result is unknown. The TimeToWaitForResult value was not sufficient to get the result of the send process.

Syntax

SendAll(&Emails)

Description

Use the SendAll method to send a number of emails, all using the same SMTP session and session properties.

Parameters

Field or Control

Definition

&Emails

Specify an array of MCFOutboundEmail objects.

Returns

An array of number. Each item in the array indicates the status of an individual email object. Values are:

Value

Description

%ObEmail_Delivered

The email was delivered.

%ObEmail_NotDelivered

Email delivery not attempted.

%ObEmail_PartiallyDelivered

The email was only partially delivered, that is, it was only delivered to some of the recipients.

%ObEmail_ FailedBeforeSending

The email wasn't delivered.

%ObEmail_ SentButResultUnknown

The email was sent but the result is unknown. The TimeToWaitForResult value was not sufficient to get the result of the send process.

Syntax

SetSMTPParam(ParamName, ParamValue)

Description

Use the SetSMTPParam method to set additional parameters for the SMTP session.

You must use this method before you use any Send method.

Parameters

Field or Control

Definition

ParamName

Specify the name of the parameter you want to overwrite.

ParamValue

Specify the value for the named parameter that you want used instead of the existing value.

Returns

None.