- 
                Notifications
    
You must be signed in to change notification settings  - Fork 10
 
Email notification
        rsvato edited this page Sep 10, 2012 
        ·
        8 revisions
      
    Send email notification
| 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) | 
| 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. | 
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>"