# sendEmailFromInform

A Workflow Engine function that sends an action-specific email using a predefined email server.

This action differs from the standard sendEmail function as it does not require a CEvent object—it is “eventless” (see Eventless workflows). All of the required parameters are passed into the action via the workflow context.

This function is designed to be called using the sendToWorkflow function (WFE or Graze API call), which supplies the required parameters in the context of the call.

### Note

A parameter that references CEvent fields will fail to substitute (as no CEvent is passed to the function). Any parameter that this action uses should reference workflowContext values for substitution.

Include line breaks in the message using $NL or <br> notation in the message argument, as shown in the example. This function is available as a feature of the Add-ons v2.4 download and later. This function is available for alert and Situation workflows. ## Arguments Workflow Engine function sendEmailFromInform takes the following arguments: Name Required Type Description emailConfig yes string Server Config Name from the Email Endpoints integration. It contains the connection information for your email server. subject yes string Subject of the inform email. message yes string Email message body. Supports macro substitution. ## Example To send an email via Graze: 1. Add a workflow to the Alert Inform Engine that includes the sendEmailFromInform action (see screenshot, below). Ensure that message contents in the template are referencing workflowContext values and not CEvent values: sendTo: $(workflowContext.sendTo)

subject:

New Incident $(workflowContext.incident_id)  message (line feeds have been added for clarity): Hi<br><br> A new Incident has been created :$(workflowContext.incident_id) : ${workflowContext.incidentDescription)<br><br> The incident is$(worklowContext.severity)<br><br>
See the incident : \$(workflowContext.incidentURL)<br><br>
Moogsoft Observability Cloud
2. Execute the Graze call (https://<server>/graze/v1/sendToWorkflow), including all the required attributes in the context parameter.

• incident_id

• sendTo

• incidentDescripton

• severity

• incidentURL

{
}