Skip to content
rsvato edited this page Sep 10, 2012 · 8 revisions

Step 'notify'

Send email notification

Plugin configuration

Name Type Default value Example
genesis.plugin.notification.sender.name String Genesis Ivan Ivanov
genesis.plugin.notification.sender.email String [email protected] [email protected]
genesis.plugin.notification.smtp.host String localhost smtp.example.com
genesis.plugin.notification.smtp.port String 25 567
genesis.plugin.notification.smtp.username String - [email protected]
genesis.plugin.notification.smtp.password String - 123456
genesis.plugin.notification.smtp.useTls Boolean false true
genesis.plugin.notification.template.folder String email_templates /home/iivanov/templates (May be Java package name)

Step parameters

Name Type Mandatory Description
emails List<String> Y Specify list of the recipients.
subject String N E-mail's subject.
templateName String Y Name of e-mail's template. Additional information about the templates can be found in the documentation for StringTemplate library.
templateParams Map<String, String> N Parameters passed to the template.

Example

variables {
   variable("globalMessage").as(String).optional(defaultValue = "Global message")
}
workflow("create"){
  steps {
    notify {
      phase = "E-mail sending"
      emails = ["[email protected]"]
      subject = "test create"
      templateName = "create_notification"
      templateParams = ["message": "Environment created"]
   }
 }
}

"create_notification" template in file "create_notification.st":

create_notification(globalMessage, message) ::= "Parampampam <globalMessage>: <message>"
Clone this wiki locally