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 smtp.hursley.ibm.com:25
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 (smtp.hursley.ibm.com:25
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:
- 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.
- The server name that is specified in the local environment.
- The value of the SMTP Server and Port property that is specified on the node.
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.
Procedure
- To send an email with a static subject and static text to a static list of recipients, see Sending an email.
- To send an email with an attachment, see Sending an email with an attachment.
- To send an email where the SMTP server, list of recipients, subject, text, and multiple attachments are all determined at run time, see Producing dynamic email messages.
- To send an email that is constructed from a MIME message, see Sending a MIME message.
- To configure the SMTP server, port number, and security identity for the EmailOutput node as an integration node external resource, see Changing connection information for the EmailOutput node.