Breadcrumbs

Dynamic E-mail

Dynamic e-mails are created with variable content and SMTP parameters. For instance, the list of recipients may be generated from a database query. For the dynamic content of an e-mail body, you may also use the output from other actions (like system messages, error messages, etc.), text data from a file, or any other backend system.



icon_download_example.png

<your example path>\Add-ons\EMail\uml\smtpEmailing.xml



Dynamic E-mail Activity Diagram

The input parameters will be mapped to objects that will be passed to the SMTP adapter in the activity diagram (see picture below).

Figure: Dynamic E-mail Activity Diagram

dynamic_email.png

In the action node create parameters parameters, the input parameters of input object email are mapped to the central buffer nodes (dynamic parameters) that will in turn be passed to the SMTP adapter (action node mail the content).

Header Parameters

The xUML Runtime assigns a correlation ID to each adapter call. This ID is stored in header field X-Bridge-CorrelationID. Adapter calls can be identified by this ID. Also, it is logged to the transaction log.

SMTP Adapter Parameters

Error rendering macro 'multiexcerpt-include' : Page loading failed

Testing Dynamic E-mail

The following figure shows input parameters entered in the SOAP Test Tool for the dynamic e-mail example shown in figure Dynamic E-mail Activity Diagram above.

Figure: Input Parameters for a Dynamic E-mail

dynamic_email_testing.png

The picture below shows the received e-mail displayed in an e-mail client.

Figure: Example of a Received E-mail

testmail.png

The address "test receiver" in the to field of the e-mail client is not an e-mail address of one of the real recipients. The real recipients are test2@e2e.ch and test3@e2e.ch as defined in the recipients array of the input object sent to the service (see Figure: Input Parameters for a Dynamic E-mail).
The same with the sender address "test sender", the real e-mail address is test1@e2e.ch and is set as return-path in the message header. The message header of this e-mail is shown below:

Microsoft Mail Internet Headers Version 2.0
Received: from smtp.rednet.ch ([172.31.2.131]) by SRHMCBEXV01.RedNet.hmc with Microsoft SMTPSVC(6.0.3790.1830);
          Fri, 17 Aug 2007 15:23:23 +0200
Received: from mail17.bluewin.ch ([172.31.1.1]) by smtp.rednet.ch with Microsoft SMTPSVC(6.0.3790.1830);
          Fri, 17 Aug 2007 15:23:23 +0200
Received: from e2e.ch (81.63.174.116) by mail17.bluewin.ch (Bluewin 7.3.121)
          id 46A5457300544277; Fri, 17 Aug 2007 13:27:34 +0000
Message-ID: <46A5457300544277@mail17.bluewin.ch> (added by postmaster@bluewin.ch)
to: test receiver
subject: testmail
from: test sender
Date: Fri, 17 Aug 2007 13:27:34 UTC
Content-Type: text/plain; charset="utf-8"
Return-Path: test1@e2e.ch
X-OriginalArrivalTime: 17 Aug 2007 13:23:23.0080 (UTC) FILETIME=[C9254C80:01C7E0D1]


Related Pages: