E-mail Sender Output Adapter

Introduction

The StreamBase E-mail Sender Output Adapter sends e-mail messages from a StreamBase application to one or more recipients via an SMTP server. Each tuple received by the adapter results in one e-mail message. The e-mail headers and body can be configured in the adapter, such that each e-mail message contains the same header/body values, or passed within tuples to the adapter, such that each e-mail message contains a different set of header and body values. Each header field can be configured independently to derive its value from one of these two sources.

Properties

Property Description
SMTP Client Host (string) The host name or IP address of the SMTP client. Normally, this property can be left blank, and the name of the local machine on which the adapter is running is sent in the EHLO message to the SMTP server. However, some SMTP servers are configured to reqire a fully-qualified client host name, in which case this property can be used to satisfy that requirement.
SMTP Server Host (string) The host name or IP address of the SMTP server.
SMTP Server Port (int) The TCP port number of the SMTP server.
From (string) The name of the schema field from which to retrieve the From e-mail header value, or the From value itself, depending upon the setting of the From Contains property.
From Contains (enumeration) If set to Schema field name, the value of the From header is retrieved from the schema field specified in the From property. Otherwise, the From property contains the actual From header value to place in all e-mail messages.
Reply To (optional string) The name of the schema field from which to retrieve the Reply To e-mail header value, or the Reply To value itself, depending upon the setting of the Reply To Contains property. If omitted, the Reply To header receives the From header value.
Reply To Contains (enumeration) If set to Schema field name, the value of the Reply To header is retrieved the from schema field specified in the Reply To property. Otherwise, the Reply To property contains the actual Reply To header value to place in all e-mail messages.
To (optional string) The name of the schema field from which to retrieve the To e-mail header value, or the To value itself, depending upon the setting of the To Contains property. If omitted, no recipients are included in the To header. At least one recipient must be included in each message in either the To, CC, and/or BCC headers.
To Contains (enumeration) If set to Schema field name, the value of the To header is retrieved from the schema field specified in the To property. Otherwise, the To property contains the actual To header value to place in all e-mail messages.
CC (optional string) The name of the schema field from which to retrieve the CC e-mail header value, or the CC value itself, depending upon the setting of the CC Contains property. If omitted, no recipients are included in the CC header. At least one recipient must be included in each message in either the To, CC, and/or BCC headers.
CC Contains (enumeration) If set to Schema field name, the value of the CC header is retrieved from the schema field specified in the CC property. Otherwise, the CC property contains the actual CC header value to place in all e-mail messages.
BCC (optional string) The name of the schema field from which to retrieve the BCC e-mail header value, or the BCC value itself, depending upon the setting of the BCC Contains property. If omitted, no recipients are included in the BCC header. At least one recipient must be included in each message in either the To, CC, and/or BCC headers.
BCC Contains (enumeration) If set to Schema field name, the value of the BCC header is retrieved from the schema field specified in the BCC property. Otherwise, the BCC property contains the actual BCC header value to place in all e-mail messages.
Subject (optional string) The name of the schema field from which to retrieve the e-mail subject, or the subject value itself, depending upon the setting of the Subject Contains property. If omitted, the e-mail message is sent with an empty subject.
Subject Contains (enumeration) If set to Schema field name, the value of the e-mail subject is retrieved from the schema field specified in the Subject property. Otherwise, the Subject property contains the actual subject value to place in all e-mail messages.
Body (optional string) The name of the schema field from which to retrieve the e-mail body, or the body value itself, depending upon the setting of the Body Contains property. If omitted, the e-mail message is sent with an empty body.
Body Contains (enumeration) If set to Schema field name, the value of the e-mail body is retrieved from the schema field specified in the Body property. Otherwise, the Body property contains the actual body value to place in all e-mail messages.
Throttle Error Messages (boolean) Determines whether the adapter suppresses duplicate error messages.
Enable SMTP Debugging (boolean) Determines whether the SMTP messages exchanged by the client and server are displayed.

Typechecking and Error Handling

Typechecking fails if a required property is omitted or if a property is configured to refer to a schema field, but its value does not contain a valid schema field name. In addition, typechecking fails if no recipients (To, CC, or BCC) are specific. This condition is caught at typecheck time only if all three recipient fields are configured with static (non-schema-derived) values.

Runtime errors occur when the configured SMTP server is inaccessible or when invalid values, such as email addresses, are passed in schema fields. The adapter emits an error message and discards the tuple. Duplicate error messages are suppressed if the Throttle Error Messages property is set to true.

Suspend/Resume Behavior

On suspend, the adapter stops processing tuples and sending e-mail messages.

On resumption, the adapter starts processing tuples and sending e-mail messages once again.