# Panel email

URL: https://docs.vaultpanel.net/guides/dns-and-email/panel-email

> Connect VaultPanel to an SMTP server so it can send invites, password reset links and alerts by email, and choose which events are emailed to whom.

VaultPanel sends its own email through an SMTP server you choose: invite and password reset links, and alerts. Set it up under **System > Panel Email**. This is separate from [email hosting](https://docs.vaultpanel.net/guides/dns-and-email/email-hosting) on your servers, although a mailbox made there can be the account the panel sends from.

## What the panel emails

| Email | When |
| --- | --- |
| **Invites and password resets** | New users and customers get their invite link by email, and so does a reset link made on the **Users** or **Customers** page. The link is still shown in the panel, in case the email does not arrive. |
| **Forgot password** | The sign-in page offers **Forgot your password?** while panel email is on. |
| **Alerts** | The events you choose, such as failed backups, cron jobs and deployments, firing alerts and servers going offline. |

When panel email is off, the panel sends nothing and shows links to hand over by other means.

## Set up the SMTP server

Any SMTP service works: your own mail server, a mailbox from **Web > Email**, or a service such as Amazon SES, Mailgun or Brevo.

### Enter the mail server

In the **Mail server (SMTP)** card:

| Field | Notes |
| --- | --- |
| **Host** | The SMTP server's host name, such as `smtp.example.com`, or an IP address. |
| **Port** | Usually 465 or 587. |
| **Security** | **SSL/TLS** (encrypted from the start, usually port 465), **STARTTLS** (plain connection upgraded to TLS, required; usually port 587) or **None** (only for a mail server on this machine or a private network). |
| **User name (optional)** | Often the full email address. |
| **Password** | Stored encrypted in the panel and never shown again. Leave it empty to keep the saved one; **Remove the saved password** deletes it. Changing the host drops the saved password unless you enter a new one. |
| **From address** | Such as `panel@example.com`. Your mail server must allow sending from it. |
| **From name** | The sender name. |

### Turn it on

Tick **Send email from the panel** and click **Save settings**.

### Send a test email

Enter an address in **Send a test email to** and click **Send test email**. The test uses the settings in the form, even before you save them, and the result shows at once.

When the test fails, VaultPanel explains what went wrong in plain words: a refused user name or password, a host that cannot be found, a port that does not answer (some hosting providers block outgoing mail ports), the wrong security option for the port, or a certificate that does not match the host name.

> **Warning:**
With **None**, the password travels in plain text. Use it only for a mail server on the same machine or a private network.

## Alerts by email

The **Alerts by email** card emails the same events [webhooks](https://docs.vaultpanel.net/guides/backups-and-automation/webhooks) carry, when they happen. Alerts go out once the mail server is saved and email is on.

Under **Email when**, tick the events to email. These are ticked until you choose others:

- A backup failed
- A restore failed
- A cron job failed or timed out
- A deployment failed
- An alert started firing
- A server went offline

You can also choose finished backups and restores, deployments that went live, resolved alerts, servers back online, and SSL certificates that are expiring, expired or failed to renew.

Choose who receives them:

- **Send to owners and admins**: every active owner and admin, at their sign-in address. On by default.
- **Also send to**: up to 10 more addresses, one per line.

## Recent emails

The **Recent emails** card lists what the panel sent in the last 30 days, one row per recipient, with its status: **Sent**, **Retrying** or **Failed**. Invite and reset links are sent at once, so whoever made them knows whether the email went. Alerts are sent by the panel's worker. A failed email is tried again after 1 minute, 5 minutes and 30 minutes, up to 4 attempts in all.

Messages are stored with their content encrypted, since a reset link signs someone in.

## Permissions

Panel email settings need the `settings.manage` permission. See [Users and roles](https://docs.vaultpanel.net/guides/security/users-and-roles).
