> **Can't find what you're looking for?** Use `search_docs` on the docs MCP server at `https://www.openfort.io/api/mcp` to find what you need.
>
> **Have feedback?** Use `submit_feedback` on the same MCP server.

# Custom SMTP

You can trial the Openfort platform by sending up to **30** emails per day via the built-in service. The default email service is offered on a best effort basis: we will do our best to maintain it and will review usage of the service on a regular basis to see if the email service should be continued.

As you progress toward production, you may find yourself wanting a custom SMTP service to increase your limits. A custom SMTP server is not subject to the built-in limit, so you set your own cap on the number of emails sent.

Beyond rate limits, an SMTP server might also help with:

* Deliverability and reputation management
* Scalability
* Analytics and tracking
* Compliance and anti-spam measures

## How to set up SMTP

Go to **Authentication** > **Email templates** in the dashboard and click **Configure custom SMTP**.

Fill in the fields below with the relevant details obtained from your custom SMTP provider:

<img width="100%" height="100%" src="https://www.openfort.io/images/blog/SMPT_setting_509fec2568.png" alt="Custom SMTP configuration form showing host, port, and authentication fields" />

### SMTP providers

You can use Openfort Auth with any major SMTP provider of your choosing. Some SMTP providers you could consider using are:

* [Twilio SendGrid](https://docs.sendgrid.com/for-developers/sending-email/integrating-with-the-smtp-api)
* [AWS SES](https://docs.aws.amazon.com/ses/latest/dg/send-email-smtp.html)

## Email templates

You can customize the email messages used for the authentication flows. You can edit the following email templates:

* Verify your email address
* Reset your password

Template editing is only available for projects on the original authentication module (v1), created before January 14, 2026. Projects on the [updated authentication module](https://www.openfort.io/docs/configuration/updated-authentication) (v2) send Openfort's default templates, and the dashboard shows the editor as coming soon. Custom SMTP works for both.

<img width="100%" height="100%" src="https://www.openfort.io/images/blog/email_templates_85f06db035.png" alt="Email template editor showing subject and body fields" />

## Terminology

The templating system provides the following variables for use:

| Name                        | Description                                                                                             |
| --------------------------- | ------------------------------------------------------------------------------------------------------- |
| `{{.redirectUrl}}`          | Openfort URL that completes the verification or password reset. It carries the one-time `state` token. |
| `{{.email}}`                | The user's email address.                                                                               |
| `{{.originalRedirectUrl}}`  | The redirect URL your app passed when it requested the email.                                          |

## Editing email templates

Edit your email templates on the **Email templates** page. Write variables without spaces inside the braces (`{{.email}}`, not `{{ .email }}`). Each variable is replaced only where it first appears, so use it once per template. Below is an example for email verification:

```text
Subject: Verify your email address

Body:
<h2>Verify your email address</h2>
    <p>Click <a href="{{.redirectUrl}}">here</a> to verify {{.email}}.</p>
```
