Class Reference
IRIS for UNIX 2019.3
InterSystems: The power behind what matters   
Documentation  Search
  [ENSLIB] >  [EnsLib] >  [EMail] >  [OutboundAdapter]
Private  Storage   

class EnsLib.EMail.OutboundAdapter extends Ens.OutboundAdapter

Adapter that sends email messages via SMTP.

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
1 11 9


Summary

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

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


Parameters

• parameter SETTINGS = "SMTPServer:Basic,SMTPPort:Basic,Credentials:Basic:credentialsSelector,SSLConfig:Connection:sslConfigSelector,SSLCheckServerIdentity:Connection,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 SSLCheckServerIdentity as %Boolean [ InitialExpression = 0 ];
When using email with Secure Socket Layer / Transport Layer Security, check the server identity in the certificate matches the name of the system we are connecting to. This defaults to being OFF but it is recommended to enable.
If enabled it matches based on the rules layed out in section 3.1 of RFC 2818.
• 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 for the local private key file, specify it in the Private key password property of the SSL/TLS Configuration.

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*


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


Copyright (c) 2019 by InterSystems Corporation. Cambridge, Massachusetts, U.S.A. All rights reserved. Confidential property of InterSystems Corporation.