Skip to main content

EnsLib.EMail.OutboundAdapter

class EnsLib.EMail.OutboundAdapter extends Ens.Util.OAuth2.Settings, Ens.OutboundAdapter

Adapter that sends email messages via SMTP.

Property Inventory

Method Inventory

Parameters

parameter SETTINGS = SMTPServer:Basic,SMTPPort:Basic,Credentials:Basic:credentialsSelector,SSLConfig:Connection:sslConfigSelector,SSLCheckServerIdentity:Connection,Recipient,Cc,Bcc,From,ContinueAfterBadSend;
Inherited description: 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 methods: BccDisplayToLogical(), BccGet(), BccIsValid(), BccLogicalToDisplay(), BccLogicalToOdbc(), BccNormalize(), BccSet()
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 methods: CcDisplayToLogical(), CcGet(), CcIsValid(), CcLogicalToDisplay(), CcLogicalToOdbc(), CcNormalize(), CcSet()
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 methods: ContinueAfterBadSendDisplayToLogical(), ContinueAfterBadSendGet(), ContinueAfterBadSendIsValid(), ContinueAfterBadSendLogicalToDisplay(), ContinueAfterBadSendNormalize()
property Credentials as %String;
This is the ID name of the set of credentials values to be used to access the server
Property methods: CredentialsDisplayToLogical(), CredentialsGet(), CredentialsIsValid(), CredentialsLogicalToDisplay(), CredentialsLogicalToOdbc(), CredentialsNormalize()
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 methods: FromDisplayToLogical(), FromGet(), FromIsValid(), FromLogicalToDisplay(), FromLogicalToOdbc(), FromNormalize(), FromSet()
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 methods: RecipientDisplayToLogical(), RecipientGet(), RecipientIsValid(), RecipientLogicalToDisplay(), RecipientLogicalToOdbc(), RecipientNormalize(), RecipientSet()
property SMTP as %Net.SMTP;
Property methods: SMTPGet(), SMTPGetSwizzled(), SMTPIsValid(), SMTPNewObject(), SMTPSet()
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 methods: SMTPPortDisplayToLogical(), SMTPPortGet(), SMTPPortIsValid(), SMTPPortLogicalToDisplay(), SMTPPortNormalize()
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 methods: SMTPServerDisplayToLogical(), SMTPServerGet(), SMTPServerIsValid(), SMTPServerLogicalToDisplay(), SMTPServerLogicalToOdbc(), SMTPServerNormalize()
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 methods: SSLCheckServerIdentityDisplayToLogical(), SSLCheckServerIdentityGet(), SSLCheckServerIdentityIsValid(), SSLCheckServerIdentityLogicalToDisplay(), SSLCheckServerIdentityNormalize(), SSLCheckServerIdentitySet()
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*

Property methods: SSLConfigDisplayToLogical(), SSLConfigGet(), SSLConfigIsValid(), SSLConfigLogicalToDisplay(), SSLConfigLogicalToOdbc(), SSLConfigNormalize(), SSLConfigSet()

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
method CredentialsSet(pInVal As %String) as %Status
method OnInit() as %Status
Inherited description: This user callback method is called just after %OnNew()
method SMTPPortSet(%val As %Integer) as %Status
method SMTPServerSet(%val As %String) as %Status
method SendMail(pMailMessage As %Net.MailMessage, Output pFailedRecipients As %ListOfDataTypes) as %Status

Inherited Members

Inherited Properties

Inherited Methods

FeedbackOpens in a new tab