> For the complete documentation index, see [llms.txt](https://docs.tpi.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tpi.dev/get-started/installation/smtp-configuration.md).

# SMTP Configuration

After installing digiRunner, configuring an SMTP server is essential to enable system-generated email notifications — such as account creation alerts, password reset messages,  system warnings, API key application.

This section provides step-by-step instructions for setting up the SMTP mail sender within the **digiRunner Admin Console**.

## Access System Settings

1. Log in to the Admin Console.
2. Go to **System Configs** > **Setting** to access the configuration page.

<figure><img src="https://content.gitbook.com/content/0choIC1BbdPOkKWOYGgk/blobs/SJXXkDOuYq2R4IdoixRC/smtp_1.png" alt=""><figcaption></figcaption></figure>

## Search for SMTP Settings

1. In the **Setting** page, enter keywords `mail` or `smtp`  in the search bar.
2. Click the search icon to filter and display related configuration keys.

<figure><img src="https://content.gitbook.com/content/0choIC1BbdPOkKWOYGgk/blobs/YfknA0kzEK9HMWXCNEQE/smtp_2.png" alt=""><figcaption></figcaption></figure>

## Configure SMTP Parameters

1. Update the following key parameters based on your mail server configuration:

| Parameter                      | Description                                                                   |
| ------------------------------ | ----------------------------------------------------------------------------- |
| `SERVICE_MAIL_ENABLE`          | Enables or disables email functionality. Must be set to `true`.               |
| `SERVICE_MAIL_AUTH`            | Enables SMTP authentication. Set to `true` if login credentials are required. |
| `SERVICE_MAIL_STARTTLS_ENABLE` | Enables TLS encryption. **Strongly recommended.**                             |
| `SERVICE_MAIL_HOST`            | Your SMTP server address, e.g., `smtp.gmail.com`.                             |
| `SERVICE_MAIL_PORT`            | SMTP server port, typically `587` for TLS.                                    |
| `SERVICE_MAIL_FROM`            | Sender email address shown in the **From** field.                             |
| `SERVICE_MAIL_USERNAME`        | SMTP username for authentication.                                             |
| `SERVICE_MAIL_PASSWORD`        | SMTP password for authentication.                                             |

2. Click on the ![](https://content.gitbook.com/content/0choIC1BbdPOkKWOYGgk/blobs/Hlz87rCAg3mpRtnNs4ee/2.png) (**Update**) icon next to each parameter to update its value, then click **Update** to apply the changes.
3. Make sure both `SERVICE_MAIL_ENABLE` and `SERVICE_MAIL_AUTH` are set to `true`  to enable proper email functionality.&#x20;

<figure><img src="https://content.gitbook.com/content/0choIC1BbdPOkKWOYGgk/blobs/L5eIBqbGU8Hwl1bOcoSA/image.png" alt=""><figcaption></figcaption></figure>

4. By default, digiRunner uses Gmail’s SMTP, `smtp.gmail.com`, and port `587` for TLS-encrypted delivery.

<figure><img src="https://content.gitbook.com/content/0choIC1BbdPOkKWOYGgk/blobs/WFRsP8kAppgIbXn7MbDl/image.png" alt=""><figcaption></figcaption></figure>

## Validate Your Configuration

### **Trigger Email-sending Events**

1. To ensure that your SMTP configuration works properly, create a new user, reset a password, or trigger a system alert to trigger an email-sending event.
2. Go to **System Information** > **Mail Log** to check the result:
   * If `Result = success`, the email was sent correctly.
   * If `Result = failure`, click on the ![](https://content.gitbook.com/content/0choIC1BbdPOkKWOYGgk/blobs/nVyqeVqoxJic5NHAoDuw/icon_Details_%E7%9C%BC%E7%9D%9B.png) (**Details**) icon to view the error.
     * Example error: A message displaying `Username and Password not accepted` indicates your SMTP credentials are incorrect.

<figure><img src="https://content.gitbook.com/content/0choIC1BbdPOkKWOYGgk/blobs/IxGNUCPvA0S40UHAOioH/image.png" alt=""><figcaption></figcaption></figure>

### &#x20;**Resend Failed Emails**

1. Go to **System Information** > **Scheduled Tasks** to proceed.
2. Find the task, e.g., `SEND_MAIL`.
3. Click on the ![](https://content.gitbook.com/content/0choIC1BbdPOkKWOYGgk/blobs/wPkO0h7ytoNo0WSd4SJ8/image.png) (**Redo**) icon, and click **Confirm** to re-trigger the mail sending task.

<figure><img src="https://content.gitbook.com/content/0choIC1BbdPOkKWOYGgk/blobs/7rjsBdSFFFnx9ASH7bSV/image.png" alt=""><figcaption></figcaption></figure>

**NOTE:**

* **Always enable TLS** to ensure secure transmission.
* Double-check SMTP credentials, hostnames, and port settings.
* Ensure your firewall allows outbound connections to the SMTP server (typically on port `25`, `465`, or `587`).
* For Gmail users:
  * Enable **App Passwords** or **Allow less secure apps** if required.
  * Avoid using personal accounts in production environments.


---

# 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 dynamically by asking a question.

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

```
GET https://docs.tpi.dev/get-started/installation/smtp-configuration.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
