Static E-mail
In a static e-mail, all mail parameters (recipients, sender, subject and body) are defined directly in tagged values of the action node, which is assigned the stereotype <<SMTPAdapter>>. Executing this e-mail service on the Bridge with static parameters will always send the same e-mail to the same recipients.
Example File (Builder project Add-ons/EMail):
<your example path>\Add-ons\EMail\uml\smtpEmailing.xml |
SMTP Header Parameter
The e-mail's header information from, to, cc, bcc, and subject are defined in tagged values in the action node static content (see figure below).
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.
E-mail Body
The body of the e-mail (content) needs to be entered in the tagged value content (see figure below).
Figure: Static E-mail
Recipients
The actual list of recipients will be generated from the tagged values to, cc, and bcc. To enter more than one recipient for a field, multiple values can be added for each corresponding tagged value. Alternatively, you can use "," or ";" to separate recipients:
recipient@mail.com, info@company.ch
In the receiver's e-mail client, the to, cc, and bcc recipients will be displayed in the corresponding fields.
Return Path
The return path of the e-mail cannot be set explicitly in the static example. Instead of that, you need to enter the tagged value from, which will be used as return path of the e-mail.
Components of the E-mail Server (Smart Host)
Added in Builder 6.0 When using static e-mail, the e-mail server (smart host) that sends the e-mail needs to be defined in the component diagram. The alias SMTPAlias links the definition in the component diagram to the activity diagram. In the activity diagram, SMTPAlias is defined by specifying the tagged value alias on the SMTP adapter (see action node static content in figure E-mail Body above).
Figure: Static E-mail Component Diagram
The SMTPAlias has the following tagged values:
Tagged Value | Description | Allowed Values |
---|---|---|
host | Supply the fully qualified name of the smart host. | any string, must be a valid SMTP server |
localhost (default) | ||
port | Supply the SMTP port number of the smart host. | any integer |
25 (default) | ||
user | Supply user and password as user/password. | any string |
Please note that, if you do not specify at least a dummy user and password, you will not be able to set it in the Bridge. An empty user tagged value will not be generated to the list of settings.
So, If you want the credentials to be configurable, provide them a default value, like e.g. user/passwd.
The alias SMTPAlias is linked to the service EMailExample, which contains the operation that is assigned the activity diagram including the SMTP adapter.