Description


The GMUS has a capability to send a user customised notification email based on the email template and the API request parameters used in the request payload.


The user needs to set up the following two properties in the properties file:

  • body=This property is optional. You can specify the HTML for the mail body here, which will override the default message for the mail body.

  • subject=This property is optional. You can specify the HTML for the mail subject here, which will override the default message for the mail subject.


List of GMUS Email Variables

The following variables can be used in GMUS Email:

  • user
  • scenario
  • scenarioPath
  • productName
  • inMemory
  • sendMail
  • emailParameters
  • debug
  • api


Sample GMUS Email Template


subject=GenRocket Scenario #{scenario} - Request Is Completed.

body=Hi <b>#{user}</b>,<br/> Your scenario #{scenario} has been Completed.<br/>The scenario = #{scenario}<br/>scenarioPath = #{scenarioPath}<br/>inMemory = #{inMemory}<br/>sendMail = #{sendMail}<br/>debug = #{debug}<br/>api = #{api}<br/>key1 = #{custom_key1}<br/>key2 = #{custom_key2}<br/><br/> GenRocket Support Team


Note: The placeholders #{api_parameter} will be replaced by the value of the parameter sent in an API request parameter.


Sample Request Payload


{
    "clientAppId": "xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
    "clientUserId": "xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
    "username": "johndoe@genrocket.com",
    "scenarios": [
        "UserScenario.grs"
    ],
    "scenarioPath": "/home/johnDoe/Downloads",
    "productName": "Product#1",
    "emailParameters": {
        "custom_key1": "value1",
        "custom_key2": "value2"
    },
    "sendMail": true,
    "inMemory": false,
    "debug": true,
    "api": [
        {
            "methodName": "receiverParameterSet",
            "parameters": {
                "domainName": "User",
                "receiverName": "GenericSQLInsertReceiver",
                "parameterName": "resourceName",
                "value": "#{resource.jdbc.config}"
            }
        }
    ]
}