> For the complete documentation index, see [llms.txt](https://codico-dispatch.gitbook.io/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://codico-dispatch.gitbook.io/documentation/integrations/smtp-email.md).

# SMTP (Email)

Send system emails from your own mail server.

CodiCo Dispatch sends [notifications](/documentation/notifications.md) by email. Under **Integrations → SMTP** you connect your own mail server, so emails come from your address.

<figure><img src="https://3342310576-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCGCbj77Uf83iIZ9ZIqRp%2Fuploads%2FjF8oGd4z31IGbfTSWG2V%2Fsmtp-settings.webp?alt=media" alt="SMTP settings: Driver, Host, Port, Username, Password, Mail sender email and name, Mail reply-to address and name, Send a test email"><figcaption><p>SMTP settings.</p></figcaption></figure>

| Field                                                | What to enter                                                      |
| ---------------------------------------------------- | ------------------------------------------------------------------ |
| **Driver**                                           | `smtp`                                                             |
| **Host** / **Port**                                  | Your mail server and port, for example `smtp.gmail.com` and `587`. |
| **Username** / **Password**                          | The login for your mail account.                                   |
| **Mail sender email** / **Mail sender name**         | The address and name customers see as the sender.                  |
| **Mail replay to address** / **Mail replay to name** | Where customer replies go.                                         |

{% hint style="info" %}
**No SMTP?** You can use CodiCo's free default server. Fill in the reply-to fields so that customer replies still reach you.
{% endhint %}

Click **Save**, then enter your address under **Send a test email** and click **Send** to check the connection.

## Gmail

To send through Gmail:

1. Turn on 2-Step Verification in your Google Account.
2. Open [App passwords](https://myaccount.google.com/apppasswords), enter a name such as *CodiCo Dispatch* and click **Generate**.
3. Use the 16-character app password as the SMTP **Password**, with host `smtp.gmail.com` and port `587`.

{% hint style="warning" %}
Use an app password, not your regular Gmail password. The error *535-5.7.8 Username and Password not accepted* means the password is wrong or is not an app password.
{% endhint %}

## Watch the video

{% embed url="<https://www.youtube.com/watch?v=Gw2d0swpNCc>" %}
Email Sending: How to Set up SMTP and what you need
{% endembed %}


---

# 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://codico-dispatch.gitbook.io/documentation/integrations/smtp-email.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.
