Configure Email Notifications

Orchestration notifications

This type of notificatinos can be configured under the Orchestration tab of a project selecting the Settings tab under this one.

They only affect the success or failure of a Job deployment and do not admit customization using a template. These notification emails are sent from the target server, not from the RapidDeploy server.

The parameters to configure are:

  • Enabled: to turn on or off this type of notifications.
  • Notification Email Address: the email of the person to be notified
  • Email Host (SMTP): hostname of the SMTP server.
  • Email Port (SMTP): port of the SMTP server.
  • Email Sender Address (SMTP Auth): username to authenticate against the SMTP server, also the sender email.
  • Email Credentials (SMTP Auth): password to authentication the SMTP server.

Server notifications

This type of notification affect a number of different aspects of the tool including all the notifications regarding the approval workflow process and the different outcomes of a Job deployment. These notifications are sent from the RapidDeploy server.

In order for these notifications to work you need to modify the application properties file to configure a proper SMTP server and all users involved in the approval process must have their email accounts set in their user settings, by configuring their email address under User menu -> About Me . These notifications do admit customization.

Configuration

To configure the SMTP server used to send email notifications to users from the RapidDeploy framework server, edit these settings. Email SMTP settings are set in the rapiddeploy.properties file. Please see the section below:

#---------------------------------
# Email settings
#---------------------------------
email.smtp.host=127.0.0.1
email.smtp.port=
email.smtp.username=
email.smtp.password=
email.sender.address=rapiddeploy@midvision.com
email.rd.url=http://localhost:9090/MidVision
  • email.smtp.host : Hostname of the SMTP server (mandatory)
  • email.smtp.port : Port of the SMTP server (optional)
  • email.smtp.username : Username to authenticate sending emails on the SMTP server (optional)
  • email.smtp.password : Password to authenticate sending emails on the SMTP server (optional). This can be a plain text password or an encrypted password using the RapidDeploy encryption tool (use 'email.smtp.password' as the key when generating the encrypted password).
  • email.sender.address : Email sender address
  • email.rd.url : URL to the RapidDeploy server that sent the email. This is included in the email as a link back in to RapidDeploy.
  • email.user.password : Boolean to define if the users password is emailed to the user on user creation. Defaults to false.

Customise Email Notification Templates

The Apache Velocity templating engine is used to generate the emails RapidDeploy sends. The templates are stored in the web application classes directory but can be overriden and customised. By default the templates are stored in the rapiddeploy-services.jar file in the web application, in a directory named emailtemplates. These files can be copied to $MV_HOME and then the template can be customised. The template files in that directory will override the template files in the application classpath. The location of the templates can be configured in the Email Template settings in the rapiddeploy.properties file. Details of how to configure these settings can be found on Apache Velocity Web Site: Velocity Developers Guide.

Please see the section below:

#--------------------------------------------
# Email Template settings
#--------------------------------------------
resource.loader=file, class
#resource.loader=file, class, jar
file.resource.loader.description = Velocity File Resource Loader
file.resource.loader.class = org.apache.velocity.runtime.resource.loader.FileResourceLoader
file.resource.loader.path = ${MV_HOME}/emailtemplates
file.resource.loader.cache = false
file.resource.loader.modificationCheckInterval = 0
class.resource.loader.description = Velocity Classpath Resource Loader
class.resource.loader.class = org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
jar.resource.loader.description = Velocity Jar  Resource Loader
jar.resource.loader.class = org.apache.velocity.runtime.resource.loader.JarResourceLoader
jar.resource.loader.path = jar:file:/${MV_HOME}/emailtemplates/defaultemailtemplates.jar