This is documentation for Caché & Ensemble.

For information on converting to InterSystems IRIS, see the InterSystems IRIS Adoption Guide and the InterSystems IRIS In-Place Conversion Guide, both available on the WRC Distributions page (login required).

Home > Class Reference > ENSLIB namespace > EnsLib.EMail.OutboundAdapter

EnsLib.EMail.OutboundAdapter

class EnsLib.EMail.OutboundAdapter extends 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,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(), ContinueAfterBadSendSet()
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(), CredentialsSet()
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(), SMTPPortDisplayToLogical(), SMTPPortGet(), SMTPPortIsValid(), SMTPPortLogicalToDisplay(), SMTPPortNormalize(), SMTPPortSet(), SMTPServerDisplayToLogical(), SMTPServerGet(), SMTPServerIsValid(), SMTPServerLogicalToDisplay(), SMTPServerLogicalToOdbc(), SMTPServerNormalize(), SMTPServerSet(), 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(), SMTPPortSet()
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(), SMTPServerSet()
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*

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 window