Skip to main content

EnsLib.EMail.InboundAdapter

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

Adapter that receives email messages via the POP3 protocol.

Property Inventory

Method Inventory

Parameters

parameter SERVICEINPUTCLASS = %Net.MailMessage;
parameter SETTINGS = POP3Server:Basic,POP3Port:Basic,Credentials:Basic:credentialsSelector,SSLConfig:Connection:sslConfigSelector,SSLCheckServerIdentity:Connection,MatchFrom,MatchTo,MatchSubject,DeleteMessage;
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 %ILastMsg as %Integer [ InitialExpression = 0 ];
Property methods: %ILastMsgDisplayToLogical(), %ILastMsgGet(), %ILastMsgIsValid(), %ILastMsgLogicalToDisplay(), %ILastMsgNormalize(), %ILastMsgSet()
property %UIDKey as %String;
Property methods: %UIDKeyDisplayToLogical(), %UIDKeyGet(), %UIDKeyIsValid(), %UIDKeyLogicalToDisplay(), %UIDKeyLogicalToOdbc(), %UIDKeyNormalize(), %UIDKeySet()
property DeleteMessage as %Boolean [ InitialExpression = 1 ];
Flag to prevent deletion of main message. Default is to delete.
Service code responsibility to handle repeated downloads.
Property methods: DeleteMessageDisplayToLogical(), DeleteMessageGet(), DeleteMessageIsValid(), DeleteMessageLogicalToDisplay(), DeleteMessageNormalize(), DeleteMessageSet()
property MailServer as %Net.POP3;
Property methods: MailServerGet(), MailServerGetSwizzled(), MailServerIsValid(), MailServerNewObject(), MailServerSet()
property MatchFrom as %String;
A list of strings to look for in the From: field of incoming email messages, separated by semicolons (';').

If empty, matches every message. If not, only messages containing any of these (partial) strings AND matching other match settings (To:,Subject:) will be processed.

Property methods: MatchFromDisplayToLogical(), MatchFromGet(), MatchFromIsValid(), MatchFromLogicalToDisplay(), MatchFromLogicalToOdbc(), MatchFromNormalize(), MatchFromSet()
property MatchSubject as %String;
A list of strings to look for in the Subject: field of email messages, separated by semicolons (';').

If empty, matches every message. If not, only messages containing any of these (partial) strings AND matching other match settings (From:,To:) will be processed.

Property methods: MatchSubjectDisplayToLogical(), MatchSubjectGet(), MatchSubjectIsValid(), MatchSubjectLogicalToDisplay(), MatchSubjectLogicalToOdbc(), MatchSubjectNormalize(), MatchSubjectSet()
property MatchTo as %String;
A list of strings to look for in the To: field of email messages, separated by semicolons (';').

If empty, matches every message. If not, only messages containing any of these (partial) strings AND matching other match settings (From:,Subject:) will be processed.

Property methods: MatchToDisplayToLogical(), MatchToGet(), MatchToIsValid(), MatchToLogicalToDisplay(), MatchToLogicalToOdbc(), MatchToNormalize(), MatchToSet()
property POP3Port as %Integer;
TCP Port on the POP3 Email Server to get mail from. If left blank, the adapter will use port 110 for plain text and port 995 for SSL/TLS.
Property methods: POP3PortDisplayToLogical(), POP3PortGet(), POP3PortIsValid(), POP3PortLogicalToDisplay(), POP3PortNormalize(), POP3PortSet()
property POP3Server as %String;
Address of the POP3 Email Server to get mail from
Property methods: POP3ServerDisplayToLogical(), POP3ServerGet(), POP3ServerIsValid(), POP3ServerLogicalToDisplay(), POP3ServerLogicalToOdbc(), POP3ServerNormalize(), POP3ServerSet()
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 inbound email will open a socket on default port 995 and use POP3 over SSL/TLS.

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. (RFC2595 provides the details.) In this case the default port is 110 for POP3. 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

method OnInit() as %Status
Inherited description: This user callback method is called just after %OnNew()
method OnTask() as %Status
Inherited description: default InboundAdapter behavior: always call ProcessInput on CallInterval
method OnTearDown() as %Status
Inherited description: This user callback method is called just before %OnClose()

Inherited Members

Inherited Properties

Inherited Methods

FeedbackOpens in a new tab