Operator SendMail

Primitive operator image not displayed. Problem loading file: ../../image/tk$com.ibm.streamsx.mail/op$com.ibm.streamsx.mail$SendMail.svg
This operator sends out an e-mail, when a tuple arrives at the input port. The operator has no output port. 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 operatoy may send messages to the operator log if something wents wrong during smtp operation. See parmater enableOperatorLog. The operator provides authentication to the smtp server if the parameter password is provided. Authentication method is LOGIN PLAIN DIGEST-MD5 NTLM This operator should not be placed inside a consistent region.

Summary

Ports
This operator has 1 input port and 1 output port.
Windowing
This operator does not accept any windowing configurations.
Parameters
This operator supports 16 parameters.

Required: from, smtpHost

Optional: acceptAllCertificates, bcc, bccAttribute, cc, ccAttribute, content, enableOperatorLog, encryptionType, password, smtpPort, subject, to, toAttribute, username

Metrics
This operator reports 1 metric.

Properties

Implementation
Java

Input Ports

Ports (0)

Every tuple received from this port triggers an outgoing e-mail. The attributes if the input stream may be used as parameters and content for the e-mail to sent. These attributes are configured through the parameters toAttribute, ccAttribute, bccAttribute, subject and content. Window punctuation markers are ignored.

Properties

Output Ports

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

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

Properties

Parameters

This operator supports 16 parameters.

Required: from, smtpHost

Optional: acceptAllCertificates, bcc, bccAttribute, cc, ccAttribute, content, enableOperatorLog, encryptionType, password, smtpPort, subject, to, toAttribute, username

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
bcc

Comma separated list of the bcc recipients. If this parameter is set, parameter bccAttribute is not allowed.

Properties
bccAttribute

The name of the input stream attribute with a comma separated list of the bcc recipients. If this parameter is set, parameter bcc is not allowed.

Properties
cc

Comma separated list of the cc recipients. If this parameter is set, parameter ccAttribute is not allowed.

Properties
ccAttribute

The name of the input stream attribute with a comma separated list of the cc recipients. If this parameter is set, parameter cc is not allowed.

Properties
content

Content of the message to send. The content string of the message is concatenated from the parameter components. If one component equals the name of an input string attribute, the attribute value is taken instead. The default is am empty line

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 SMTP connection. Default is NONE

Properties
from

Email address to use for SMTP MAIL command. This sets the envelope return address. This address should be a valid and active e-mail account.

Properties
password

The password for the SMTP account

Properties
smtpHost

The SMTP relay host name/address.

Properties
smtpPort

The SMTP host port. Defaults to 25 if encryptionType is NONE, 587 if encryptionType is STARTTLS and 587 if EncryptionType is TLS

Properties
subject

The subject of the message. The subject string of the message is concatenated from the parameter components. If one component equals the name of an input string attribute, the attribute value is taken instead. The default value is 'ALERT form Streams !'

Properties
to

Comma separated list of the to recipients. If this parameter is set, parameter toAttribute is not allowed. One of to and toAttribute is required.

Properties
toAttribute

The name of the input stream attribute with a comma separated list of the to recipients. If this parameter is set, parameter to is not allowed. One of to and toAttribute is required.

Properties
username

The user name for SMTP. This parameter is required if the SMTP server requires authorization. The default is the value of parameter from.

Properties

Metrics

nEmailFailures - Counter

The number of failed e-mail transmissions.

Libraries

Operator class library
Library Path: ../../impl/lib/com.ibm.streamsx.mail.jar, ../../lib/*