> For the complete documentation index, see [llms.txt](https://lern.sunbird.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lern.sunbird.org/use/developer-guide/user-and-org-service/configuration/email-notification-configuration.md).

# Email Configuration

In sunbird, SendGrid is used for sending email notifications. Below are the confgurations that need to be updated for sending email. These configurations are common for user-org service, notification service and notification data-pipeline flink job.

```
sunbird_mail_server_host = 
sunbird_mail_server_port = 
sunbird_mail_server_username = 
sunbird_mail_server_password = 
sunbird_mail_server_from_email = support@open-sunbird.org
sendgrid_connection_reset_interval //default is 60000L
```

#### Adding Email Template to Cassandra DB <a href="#adding-email-template-to-cassandra-db" id="adding-email-template-to-cassandra-db"></a>

Userorg service stores email templates in the table **email\_template** within the **sunbird** keyspace.

The following command allows you to view email templates currently available in Cassandra DB:

`SELECT * from sunbird.email_template;`

Command to add an email template to Cassandra DB using CQL shell. Ensure that the template name is unique so that it doesnot override the existing template information in Cassandra DB:

```
  INSERT INTO sunbird.email_template(name, template) VALUES('myEmailTemplate', '<!doctype html><html> <head> <meta> <meta> <title></title> </head> <body> <table> <tr> <td>&nbsp;</td><td> <div class="content"> <span class="preheader"></span> <table class="main"> <tr> <td class="wrapper"> <table> <tr> <tr> <td> #if ($orgImageUrl) <p> <img src="$orgImageUrl" alt="logo" align="right" width="180" height="100"> </p>#end </td></tr><td> #if ($name) <p >Hi $name,</p>#end <p >$body</p></body></html>')

```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://lern.sunbird.org/use/developer-guide/user-and-org-service/configuration/email-notification-configuration.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
