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

# Email Configuration

> Configure SMTP settings for transactional emails.

Navigate to **Admin → Settings → Email** to configure outgoing mail.

## SMTP settings

| Field        | Description                                              |
| ------------ | -------------------------------------------------------- |
| Host         | SMTP server hostname (e.g. `smtp.mailgun.org`)           |
| Port         | Usually `587` (TLS) or `465` (SSL)                       |
| Username     | SMTP authentication username                             |
| Password     | SMTP authentication password                             |
| Encryption   | `tls` or `ssl`                                           |
| From Address | The sender email address (e.g. `noreply@yourdomain.com`) |
| From Name    | The sender display name                                  |

<Note>
  Settings saved here override values in the `.env` file at runtime. If you update SMTP settings in the admin panel, you do not need to restart the application.
</Note>

## Transactional emails sent by StartMyVPN

| Email               | Trigger                                                 |
| ------------------- | ------------------------------------------------------- |
| Service Activated   | New subscription becomes active                         |
| Service Suspended   | Subscription suspended for non-payment or manual action |
| Service Reactivated | Suspended subscription is reactivated                   |
| Service Cancelled   | Subscription is cancelled                               |
| Expiration Reminder | Sent N days before a subscription expires               |
| Payment Receipt     | Successful payment processed                            |
| Password Reset      | User requests a password reset                          |
| Email Verification  | New user registration                                   |

## Testing email delivery

After configuring SMTP, use the built-in test:

```bash theme={null}
php artisan tinker
>>> \Mail::raw('Test email', fn ($m) => $m->to('you@example.com')->subject('Test'));
```

Or send a password reset email to yourself through the login page.
