> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.autophish.io/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Send Simulations through Your Own Mail Server (Custom SMTP)

By default, AutoPhish sends simulation e-mails through its own infrastructure. With Custom SMTP, you can instead send them through your own mail server and from your own domains – for example to test how your staff react to messages that look like they come from inside the company.

## Before you start

- Custom SMTP is available on selected plans. The page shows how many servers your plan allows, e.g. "Using 0 of 1 SMTP servers on your plan". If your plan does not include it, contact us.
- Only company **admins** can set it up.
- You need the SMTP host, port, username and password of the mail server, and access to your DNS to verify the sending domain.
- Custom SMTP is only used for simulation e-mails. Password resets, reports and other AutoPhish system e-mails are always sent by AutoPhish.

## Step 1 – Add the SMTP server

1. Go to **Settings → Custom SMTP** and click **Add SMTP server**.
2. Fill in:
   - **Name** – for your own reference
   - **Host** and **Port** (default 587)
   - **Implicit TLS (port 465)** – tick it for port 465; leave it unticked for STARTTLS (usually port 587)
   - **Username** and **Password**
   - **Default from name** (optional) – used when the campaign has no display name
3. Click **Create server**.

![Settings - Custom SMTP - New SMTP server](https://storage.crisp.chat/users/helpdesk/website/-/4/3/7/4/437439cedb096800/custom-smtp-new-server_11ydai5.png)

## Step 2 – Test the connection

Click **Test connection**. When you see "Connection succeeded.", the server card shows the verification date.

## Step 3 – Add and verify sending domains

1. Under **Sending domains**, enter the domain you want to send from (e.g. `mail.yourcompany.com`) and click **Add domain**.
2. AutoPhish shows a DNS **TXT record** for `_autophish-smtp.<your domain>`. Publish it at your DNS provider.
3. Click **Verify**. Once you see "Domain verified.", the domain is ready.

The verification token is valid for 14 days. DNS changes can take a while to propagate – if you see "DNS record not found yet", wait and try again.

## How campaigns use your server

When a campaign sends from an address on one of your verified domains, the e-mail goes through the matching SMTP server. All other sender domains continue to use AutoPhish's servers. Each domain belongs to exactly one server – if you have more than one server, use the server drop-down next to the domain to move it.

## Good to know

- **Allowlisting still matters.** Even on your own server, spam filters may hold back simulations because they look like phishing. See "How to make sure Campaign E-Mails are received well".
- **Don't delete servers used by running campaigns.** A campaign keeps the server it started with. If that server is deleted or deactivated, its e-mails fail – they do not fall back to AutoPhish's servers.
- **Test connection** checks the login, not each individual send. Send a test campaign to yourself first.
- Hosts that resolve to private or internal IP addresses cannot be used. The server must be reachable from the internet.
- If your plan is downgraded or cancelled, Custom SMTP stops working immediately.