# Custom notification

Spinnaker doesn't support email id in the input field as a SpEL(Spring Expression Language) expression and parameters. Using this **Custom notification-OpsMx** custom stage, we can pass SpEL expression as well as parameters for all inputs like email, CC address, subject, and body message.&#x20;

### Prerequisites:&#x20;

* To configure and use **Custom notification-OpsMx** custom Stage, you should have prior knowledge of spinnaker and spinnaker custom stage job.&#x20;
* You must have a running spinnaker with a Kubernetes cluster account configured in it. \
  For more information on spinnaker custom job, refer [**here**](https://www.spinnaker.io/guides/operator/custom-job-stages/)**.**

### **Configure Spinnaker with Custom notification-OpsMx:**

Execute the below steps to configure Spinnaker with **"Custom notification-OpsMx**" custom stage.

1. Make sure **Custom notification-OpsMx** configuration is stored in the orca-local.yml file in the path ***/home/spinnaker/.hal/default/profiles*** which is in Halyard pod and a dependent **configmap** with the name **email-config** is already configured with ISD.
2. **Update the secrets as follows:**&#x20;
   * **ssmtp-secrets:** It contains the SMTP server email address and password. Edit the secret and provide your details in base64 encoded format.
   * **Sample Data:**&#x20;
     * Emailpassword: cGFzc293cmRtYWls&#x20;
     * ssmtpemail: b3BzbXh1c2VyQG9wc214Lmlv

{% hint style="info" %}
**Note: SMTP (Simple Mail Transfer Protocol) email configuration is required for the email notification.**
{% endhint %}

To add “**Custom notification-OpsMx**” stage to your pipeline follow the steps below:

1. Go to your application and click “**Pipeline builder**” and click “**Add Stage**” and then select “**Custom notification-OpsMx**” stage from the drop-down menu as shown below.

![](https://lh6.googleusercontent.com/frxZyKWGC-wG84rwDqa_xh399LubxjsuEvzrcA2OuTkMwWL4ZCOsHNY4MzCf9M8YeS01PgVzygGSf93vhKiTlZwltQfGg0NhY6Eg4WXOFZXcqZnLXUPHAL8yQ0kt32-95AG0knVqGyoYFbALml1T6Yg)

2\.  Now the configuration screen appears to provide the required parameters.

![](https://lh4.googleusercontent.com/Xpxx7LZrdZLmtguypamz_H0w8Il7g0q3XZn-wiVPeaWzO4rT36GJxc_0NvrTlYgrrDgyksbOB6DCnv6vOYMCWjswe-ngHg_FpUrQ7BlsGv_LuGEs9Ix--4pIdE5pXE9mXHvPPVX8NCjkIU6QTlXp09k)

**Enter the following parameters on the above configuration screen:**

* **Email:** Provide email id as SpEL expression or parameters. Example: ${#stage('build')\['outputs']\['spinnaker\_property\_email']} ${paramters.email} ${ccmailids}&#x20;
* **CC Address:** CC the other email address.&#x20;
* **Subject:** Headline of the mail.&#x20;
* **Body Message:** Please enter the content of the email body that is to be texted.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.opsmx.com/opsmx-1/opsmx-context-engine/user-guide/custom-stages/custom-notification.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
