> For the complete documentation index, see [llms.txt](https://docs.cobrowse.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cobrowse.io/enterprise-self-hosting/getting-started/configuring-smtp.md).

# Configuring SMTP

Cobrowse supports configuring a custom SMTP server to replace the default email provider. This will allow you to use your company email to send the magic link login emails.

### Configuring SMTP

To configure the SMTP server using the Admin interface follow these steps:

1. Firstly make sure you have configured at least one [superuser](/enterprise-self-hosting/getting-started/adding-a-superuser.md) in your instance.
2. Open `/admin/configuration` on your instance while logged in as a superuser. e.g. <https://example.com/admin/configuration>
3. Enter a new configuration key called "**smtp\_url**". The value should be the URL of your SMTP server including any authentication or non-standard ports.

{% hint style="info" %}
The SMTP server can also be configured by setting a "**smtp\_url"** environment variable on the API service of your deployment.
{% endhint %}

#### Configure from-address

Please use the username part of the SMTP URL to change the email address seen as the sender of the email. The username should be the full email address you wish to use but it must be an address the SMTP server can send from.

```
smtps://no-reply@example.com@smtp.example.com
```

**Example SMTP URLs**

A standard SMTP URL has the format `smtps://username:password@smtp.example.com`

If your mail server does not require authentication, you can omit the `username:password` fields, e.g.`smtps://smtp.example.com`

If your mail server does not require a TLS connection, use can use the `smtp://` protocol in the URL instead, e.g. `smtp://smtp.example.com`

If your mail server uses a non-standard port you can specify that via the URL, e.g. `smtp://smtp.example.com:12345`

#### Troubleshooting

During debugging it can be useful to increase console messages and reduce impacting factors.

{% hint style="info" %}
We only recommend adding these query parameters when debugging in a test environment. We do not recommend adding any of these to your production SMTP URL.
{% endhint %}

#### Additional logging

To increase the log level add the `debug` and `logger` query parameters to your SMTP URL.

`smtps://example.com?debug=true&logger=true`

#### Disable TLS validation

It may be useful to remove any TLS validation during debugging to understand where the problem might be. To do this you can add the `rejectUnauthorized` query parameter with the value of `false` and append port number `25` to the end of the URL.

`smtp://example.com:25?tls.rejectUnauthorized=false`


---

# 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:

```
GET https://docs.cobrowse.io/enterprise-self-hosting/getting-started/configuring-smtp.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.
