Send a Custom Email to Specific Recipients
This workflow action will send a custom email to the specified recipients.
|
For security reasons, the subject and body of the email must be specified using Velocity  template files (*.vm) that must have been approved and uploaded to the directory ~/CB-.../tomcat/webapps/cb/config/templates/email on the Codebeamer |
For example:
The action has the following parameters:
• Recipients are required and are the email recipients, which can be specified as the following:
◦ Users
◦ Groups
◦ Roles
◦ Member fields of the tracker item that is subject or source of the triggering event.
• Subject: The name of the Velocity template file for the email subject line (required).
• Content: The name of the Velocity template file for the email content (required).
The
Velocity
template files (*.vm) for the Subject and the Content, must reside in
~/CB-.../tomcat/webapps/cb/config/templates/email.
The
Velocity
context for both, the subject and the content/body template, contains the following information:
Variable | Type | Meaning |
---|
user | UserDto | The user that executed the state transition that triggered this email. |
subject | TrackerItemDto | The tracker item that is the subject of the triggering event and the email. |
source | ArtifactDto | The source of the triggering event, such as a state transition or escalation rule. |
tracker | TrackerDto | The tracker of the subject item. |
project | ProjectDto | The project of the subject item. |
transition | WorkflowTransitionDto | Is true if the action was called from a state transition; otherwise, it is false. |
recipient | UserDto | The recipient of this e-mail. |
textFormatter | TextFormatter | A helper for locale-specific formatting. |
For example:
custom_example_email_subject.vm:
Dear ${recipient.realName}, please have a look at ${subject}
custom_example_email_body.vm:
#parse("notification_email_header.vm")
<div class="comment-box">
Dear ${recipient.realName}, <br/>
${user.realName} did ${source.name} #linkTrackerItem(${subject})
</div>
whatever that means to you ...
#parse("notification_email_footer.vm")