> ## Documentation Index
> Fetch the complete documentation index at: https://docs.oasm.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Mail server

> Configure the SMTP server OASM sends email through, with presets for common providers and a test email

The **Mail server** page sets how OASM sends email. Today it sends the verification emails of [public sign-up](https://docs.oasm.io/authentication.md), which stays closed while the mail server is off.

The page lives in the console's **Admin** area under **System → Mail server** (`/admin/mail-server`).

> [!NOTE]
>
> Available from v0.10.0. Only users with the platform **Admin** role can change it — see [Users and roles](https://docs.oasm.io/users-and-role.md#the-admin-area).

## Providers

OASM sends every email over SMTP. Most email services offer an SMTP relay, so picking a provider fills in its host, port, and TLS setting, and the username where the service expects a fixed one. You usually only paste a key.

| Provider | Host : port | Username | Password field |
| - | - | - | - |
| **Resend** | `smtp.resend.com:465` | `resend` (filled in) | API key |
| **SendGrid** | `smtp.sendgrid.net:587` | `apikey` (filled in) | API key |
| **Postmark** | `smtp.postmarkapp.com:587` | Server API token | Server API token |
| **Mailgun** | `smtp.mailgun.org:587` | SMTP login | SMTP password |
| **Amazon SES** | `email-smtp.us-east-1.amazonaws.com:587` | SMTP username | SMTP password |
| **Brevo** | `smtp-relay.brevo.com:587` | SMTP login | SMTP key |
| **Gmail / Google Workspace** | `smtp.gmail.com:465` | Gmail address | App password |
| **Custom SMTP** | Your server | Your username | Your password |

> [!TIP]
>
> For **Mailgun**, use `smtp.eu.mailgun.org` for domains in the EU region. For **Amazon SES**, change the region in the host to match yours. **Gmail** needs 2-Step Verification and an [app password](https://support.google.com/accounts/answer/185833).

## Set up the mail server

**1. Open the page**

Open the user menu, choose **Admin**, then **Mail server** under **System**.

**2. Pick a provider**

Choose one under **Provider**. Every field stays editable, for example to change a region in the host.

**3. Fill in the credentials**

Enter the username and the password or API key. **Implicit TLS** is usually on for port 465; off uses STARTTLS, usually on port 587.

**4. Set the sender**

**Sender email** is the From address; your provider must allow sending from it. **Sender name** defaults to the platform name — see [Brand name and logo](https://docs.oasm.io/brand-name-and-logo.md).

**5. Turn it on and save**

Switch on **Turn on mail server** and click **Save**. Turning it on needs a host and a sender email.

**6. Send a test email**

Under **Send a test email**, check the address (your own by default) and click **Send test email**. If the server refuses, the error says why, for example `Invalid login: 535 Bad credentials`.

> [!NOTE]
>
> The password or API key is stored encrypted with your [encryption keys](https://docs.oasm.io/deployment.md#encryption-keys) and never sent back to the console: the field shows *"Saved; leave empty to keep it"*. Leave it empty to keep the saved one, or type a new one to replace it. Changes apply to the next email, with no restart.

## Troubleshooting

> [accordion] The test email fails with 535 or authentication failed
>
> The username or password is wrong for this provider. For API-key providers, check that the key has SMTP or sending permission; for Gmail, use an app password, not the account password.

> [accordion] The test email times out
>
> The host or port is unreachable from the server — some cloud providers block outgoing SMTP ports. Check the host and port, try 587 instead of 465 (or the reverse, switching **Implicit TLS** to match), or ask your hosting provider to open the port.

> [accordion] Emails arrive in spam
>
> Send from a domain you control and set up SPF, DKIM, and DMARC for it as your provider describes. A sender address on a free mailbox domain is often marked as spam.

> [accordion] The Send test email button is disabled
>
> It uses the saved settings, so save your changes and turn the mail server on first.

## Related

> [card] [Authentication](https://docs.oasm.io/authentication.md)
>
> Open public sign-up once the mail server works

> [card] [Deployment](https://docs.oasm.io/deployment.md)
>
> `BASE_URL` and the encryption keys that protect the saved password


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.