You can send an email with a fixed
subject and fixed text, and an attachment, to a static list of recipients.
About this task
You can configure an EmailOutput node to send an
email with a single attachment. To send an email with multiple attachments,
see Producing dynamic email messages.
Use
the IBM® App Connect Enterprise
Toolkit to configure the properties
on the EmailOutput node
so that you can send an email with a statically defined subject and
text, and an attachment, to a statically defined list of recipients.
This method causes the email message to be constructed as a MIME message.
The subject, text, and list of recipients remains static, but the
content of the attachment is sought dynamically from the message that
is passed to the EmailOutput node
at run time. The location of the attachment in the message is defined
statically.
Procedure
- Switch to the Integration Development
perspective.
- Add an EmailOutput node
to your message flow.
- Edit the following properties of the EmailOutput node.
- On the Basic tab, add the SMTP
Server and Port information (for example, smtp.server.com:25).
- On the Email tab, add the email
addresses of recipients by using the To
Addresses, Cc Addresses,
and Bcc Addresses properties.
- On the Email tab, add the email
address of the sender by using the From
Address and Reply-To Address properties.
- On the Email tab, provide a subject
for the email by using the Subject
of email property.
- On the Email tab, provide the
text of the email by using Email
message text property.
- On the Attachment tab, set the Attachment Content property by using
either an ESQL or XPath expression, referring to an element in the
message tree; for example, Body.BLOB.
- On the Attachment tab, set the Attachment Content Name property
with the name of the attachment as it appears in the email.
- On the Attachment tab, set the Attachment Content Type, Attachment Content Encoding, and Multipart Content Type properties
to determine the type of attachment that is sent in the MIME message.
- Save the changes.
- Add the message flow to the BAR file and deploy.
Results
When a message is passed into the deployed EmailOutput node, an email
is sent to the defined set of recipients, containing the subject,
text, and attachment specified on the node.