Sending emails

You can configure IBM® Integration Bus to send an email, with or without attachments, to a static or dynamic list of recipients.

About this task

You can configure the EmailOutput node to send an email, with or without a single attachment, with a static subject and static text, to a static list of recipients. You can also construct a message flow that can produce an email where the SMTP server, list of recipients, subject, text, and multiple attachments are all determined at run time.

You can use the SMTP Server and Port property of the EmailOutput node to specify the host name of the SMTP server that the integration node uses to send emails, or to specify an alias that refers to a configurable service that is defined on the integration node. To enable the configurable service, use the mqsicreateconfigurableservice and mqsichangeproperties commands, as shown in the following example:
mqsicreateconfigurableservice integrationNodeName -c SMTP -o SMTP_MyAlias
mqsichangeproperties integrationNodeName -c SMTP -o SMTP_MyAlias -n serverName -v
If the value of the SMTP Server and Port property is set to the defined alias (in this case, SMTP_MyAlias), any values that are overridden by the administrator ( set on the command line as the server name) are used in preference to any statically defined value or override value in the local environment.
The order of preference for value selection is:
  1. The value that is specified in the configurable service if an alias exists with the name that was supplied in the SMTP Server and Port property.
  2. The server name that is specified in the local environment.
  3. The value of the SMTP Server and Port property that is specified on the node.
Any alias can be removed by using the mqsideleteconfigurableservice command, so that the node reverts to resolving the host name from the value that is set in the local environment or on the node. While most configurable service properties are set by the mqsichangeproperties command, security identities (user IDs and passwords) are typically set by using the mqsisetdbparms command and are referenced in a separate SecurityIdentity property, for example:
mqsisetdbparms integrationNodeName -n smtp::MyIdentity -u userName -p password
mqsichangeproperties integrationNodeName -c SMTP -o SMTP_MyAlias -n securityIdentity -v MyIdentity 

The topics in this section describe the different ways in which you can use the EmailOutput node to send email messages.