Operator ReadMail

Primitive operator image not displayed. Problem loading file: ../../image/tk$com.teracloud.streams.mail/op$com.teracloud.streams.mail$ReadMail.svg

The ReadMail operator reads e-mails from an imap server and ingests one tuple for each received e-mail.

This operator supports the following encryption methods:
  • NONE: no encryption
  • STARTTLS: The client sends the command STARTLS and the communication switches to TLS encryption. The operator requires the STARTTLS method and the server must support it.
  • TLS: The client requires TLS connection to the server.
The trust store may be changed with the appropriate System property like:

vmArg: ' -Djavax.net.ssl.trustStore=mykeystore'

The operator may send messages to the operator log if something wents wrong during imap operation. See parmater enableOperatorLog. Each scan cycle is finalized with a Window punctuation marker.The operator provides authentication to the imap server. The parameter password is required. This operator should not be placed inside a consistent region.

Summary

Ports
This operator has 0 input ports and 2 output ports.
Windowing
This operator does not accept any windowing configurations.
Parameters
This operator supports 13 parameters.

Required: imapHost, password, username

Optional: acceptAllCertificates, deleteAfterRead, enableOperatorLog, encryptionType, folder, imapPort, initDelay, iterations, period, readNewMailsOnly

Metrics
This operator reports 3 metrics.

Properties

Implementation
Java

Output Ports

Assignments
Java operators do not support output assignments.
Ports (0)

Port that produces tuples for each received e-mail. The schema must be of type com.teracloud.streams.mail::Mail or of type com.teracloud.streams.mail::Maile. Every message part of type text/plain and text/HTML is converted to an rstring element of the attribute content.Multipart messages are supported.

Properties

Ports (1)

Optional error output port. The error output stream must suport at least the attributes of type com.teracloud.streams.mail::RuntimeError

Properties

Parameters

This operator supports 13 parameters.

Required: imapHost, password, username

Optional: acceptAllCertificates, deleteAfterRead, enableOperatorLog, encryptionType, folder, imapPort, initDelay, iterations, period, readNewMailsOnly

acceptAllCertificates

Accept all SSL certificates, this means the server certificate is not checked. Setting this option will allow potentially insecure connections. Default is false.

Properties
deleteAfterRead

If true the ReadMail operator deletes the e-mail after the tuple was produced. Default is false.

Properties
enableOperatorLog

If enabled, every sucessfully smtp opoeration triggers an debug level entry in the operator log and every smtp failure triggers an error level entry in the operator log. Default is true.

Properties
encryptionType

Encryption method to be used for the IMAP connection. Default is TLS

Properties
folder

Mailbox folder to read from. Default is INBOX

Properties
imapHost

The IMAP server host name/address.

Properties
imapPort

The IMAP host port. Defaults to 143 if encryptionType is NONE or STARTTLS and 993 if EncryptionType is TLS

Properties
initDelay

Specifies the number of seconds that the operator delays before starting to read e-mails.

Properties
iterations

Specifies the number of e-mail scan operations to be produced by the ReadMail operator. When the parameter is not specified or the has a negative value, the operator scans e-mails until the application is shut down.

Properties
password

The password for the IMAP server

Properties
period

Specifies the time interval between successive tuple submissions, in seconds. When the parameter is not specified, the default value is 60.0.

Properties
readNewMailsOnly

If true the ReadMail operator produces tuples for new e-mails only. Mails which have been seen before are ignored. Default is false.

Properties
username

The user name for IMAP server.

Properties

Metrics

nEmailFailures - Counter

The number of failed e-mail operations.

nIgnoredMessageParts - Counter

The number of ignored message parts due to a not supportet content type

nScanCycles - Counter

The number of e-mail scan operations performed.

Libraries

Operator class library
Library Path: ../../impl/lib/com.teracloud.streams.mail.jar, ../../lib/*