Learning
Documentation
Community
Open Exchange
Global Masters
Home / Class Reference / ENSLIB namespace / EnsLib.EMail.OutboundAdapter
Private  Storage   

EnsLib.EMail.OutboundAdapter


class EnsLib.EMail.OutboundAdapter extends
Ens.OutboundAdapter

Adapter that sends email messages via SMTP.

Inventory


Parameters Properties Methods Queries Indices ForeignKeys Triggers
1 10 9


Summary


Properties
%CredentialsObj %WarnedLatest Bcc BusinessHost
Cc ContinueAfterBadSend Credentials From
KeepaliveInterval Recipient RegistryID SMTP
SMTPPort SMTPServer SSLConfig

Methods
%%OIDGet %AddToSaveSet %BindExport %BuildObjectGraph
%ClassIsLatestVersion %ClassName %Close %ConstructClone
%DispatchClassMethod %DispatchGetModified %DispatchGetProperty %DispatchMethod
%DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty %Extends
%GetParameter %IncrementCount %IsA %IsModified
%New %NormalizeObject %ObjectModified %OriginalNamespace
%PackageName %RemoveFromSaveSet %SerializeObject %SetModified
%ValidateObject AddBccRecipients AddCcRecipients AddRecipients
AssignOneSetting ClearAllAppData ClearRuntimeAppData ClearStaticAppData
ContinueAfterBadSendSet CredentialsSet EnumerateSettingsClose EnumerateSettingsExecute
EnumerateSettingsFetch EvalInitialExpression GetSettings OnInit
OnKeepalive OnTearDown SMTPPortSet SMTPServerSet
SendMail


Parameters


• parameter SETTINGS = "SMTPServer:Basic,SMTPPort:Basic,Credentials:Basic:credentialsSelector,SSLConfig:Connection:sslConfigSelector,Recipient,Cc,Bcc,From,ContinueAfterBadSend";
List of properties can be set as settings in the configuration file format is a comma separated list of property names

Properties


• property Bcc as %String(MAXLEN=2000);
The email address(es) of a recipient or a comma and/or semicolon separated list of recipients that will be added to the Bcc: list of each mail message sent.
• property Cc as %String(MAXLEN=2000);
The email address(es) of a recipient or a comma and/or semicolon separated list of recipients that will be added to the Cc: list of each mail message sent.
• property ContinueAfterBadSend as %Boolean [ InitialExpression = 1 ];
If true, sending the email will continue if a send fails and failed email addresses will be logged in the event log. The default is true.
• property Credentials as %String;
This is the ID name of the set of credentials values to be used to access the server
• property From as %String(MAXLEN=200);
The default From: address to put in sent mail messages. May be overridden by the Operation implementation code.
• property Recipient as %String(MAXLEN=2000);
The email address(es) of a recipient or a comma and/or semicolon separated list of recipients that will be added to the To: list of each mail message sent.
• property SMTP as %Net.SMTP;
• property SMTPPort as %Integer;
The IP Port on the SMTP server to send mail to. If left blank, the adapter will use port 25 for plain text and port 465 for SSL/TLS.
• property SMTPServer as %String(MAXLEN=100);
The IP address of the SMTP server to send mail to. (Note: the timeouts for connecting and sending mail can be more than 10 minutes).
• property SSLConfig as %String;
To use email with Secure Socket Layer / Transport Layer Security, the SSLConfig field must contain the name of an existing SSL/TLS Configuration of the Client type. You can create one using the System Management Portal [Security Management] > [SSL/TLS Configurations] page.

If your SSL Configuration requires you to supply a password when connecting, specify it in the SSLConfig field by adding a '|' after the configuration name, followed by the password string; for example:
MySSLItem|mypassword

When you specify a value in the SSLConfig field, the normal case is that outbound email will open a socket on default port 465 and use SMTP over TLS/SSL.

The SSLConfig field also supports the special case when you want the server interaction to begin on a normal TCP socket and then switch to SSL/TLS on the same port as the normal socket. (RFC3207 provides the details.) In this case the default port is 25 for SMTP. To use this convention, append '*' to your entry in the SSLConfig field; for example:
MySSLItem*
or:
MySSLItem|mypassword*


Methods


• classmethod AddBccRecipients(pMailMessage As %Net.MailMessage, pRecipients As %String)
• classmethod AddCcRecipients(pMailMessage As %Net.MailMessage, pRecipients As %String)
• classmethod AddRecipients(pMailMessage As %Net.MailMessage, pRecipients As %String)
• method ContinueAfterBadSendSet(%val As %Integer) as %Status
This is a Set accessor method for the ContinueAfterBadSend property.
• method CredentialsSet(pInVal As %String) as %Status
This is a Set accessor method for the Credentials property.
• method OnInit() as %Status
This user callback method is called just after %OnNew()
• method SMTPPortSet(%val As %Integer) as %Status
This is a Set accessor method for the SMTPPort property.
• method SMTPServerSet(%val As %String) as %Status
This is a Set accessor method for the SMTPServer property.
• method SendMail(pMailMessage As %Net.MailMessage, Output pFailedRecipients As %ListOfDataTypes) as %Status