# Set Up Custom SMTP

> Use Custom SMTP when your email server is not on the provider list but supports standard SMTP authentication — enter the host, port, security mode, and credentials to connect.

- Human page: https://mailrith.com/docs/setup-custom-smtp
- Category: Campaigns & Delivery
- Reading time: 8 min read

## What this guide covers
Connect any SMTP server to Mailrith by entering the host, port, security mode, and credentials — for providers not in the prebuilt list.

## Sections
- Before You Start
- Mailrith Fields
- SMTP Server Setup
- Testing and Troubleshooting

## Visual Reference
![Mailrith email delivery connections page showing connected providers with action controls.](https://mailrith.com/docs/screenshots/email-delivery-connections.png)

The Email Delivery Connections page lists every connected provider. From here you can add a new connection, send a test email, view webhook endpoints, and assign connections to workspaces.

## Before You Start

Use Custom SMTP when your sending service is not one of Mailrith's built-in providers but can send email through standard SMTP login details. This may be a corporate mail relay, a self-managed server, or another email service provider.

Ask your mail administrator or provider for these details:

- **SMTP host:** the server address, such as `smtp.example.com`.
- **SMTP port:** commonly 587 for STARTTLS or 465 for TLS.
- **Security mode:** STARTTLS, TLS, or none. Use encrypted modes whenever the server supports them.
- **Username:** the login name, often the sending email address.
- **Password:** the SMTP password or app-specific password.
- **Allowed From email:** the address the server permits this login to send from.
- **Optional event forwarding:** if the provider can send bounce or complaint events to a custom URL, Mailrith can provide a delivery-event webhook endpoint.

Custom SMTP has more setup variation than API-based providers. If you are unsure about host, port, or security mode, confirm them with the provider before testing repeatedly.

If you are choosing between a provider API and SMTP, read [SMTP, APIs, and Delivery Providers](https://mailrith.com/guides/smtp-and-delivery-providers.md). If the security mode or port is unclear, read [TLS and Secure Sending](https://mailrith.com/guides/tls.md) before testing.

## Mailrith Fields

In Mailrith, click [Email Delivery Connections](https://mailrith.com/docs/email-delivery-connections.md) in the left sidebar, click **Create Connection**, choose **Custom SMTP** in **Select Email Delivery Service**, and enter these fields in **Connect Email Delivery Service**:

- **Connection name:** an internal label, such as "Corporate SMTP Relay".
- **SMTP Host:** the server address exactly as provided.
- **Port:** the port number used by the server.
- **Security:** STARTTLS, TLS, or none. Port 587 commonly uses STARTTLS, and port 465 commonly uses TLS.
- **Username:** the SMTP login name.
- **Password:** the SMTP password or app password.
- **From name:** the sender name subscribers see.
- **From email:** an address the SMTP account is allowed to use.
- **Workspaces:** the Mailrith workspaces that can send through this SMTP server.

## SMTP Server Setup

1. Confirm the SMTP server allows authenticated sending from Mailrith.
2. Create or collect a username and password for sending.
3. Confirm the From email is allowed for that username.
4. In [Email Delivery Connections](https://mailrith.com/docs/email-delivery-connections.md), click **Create Connection**, choose **Custom SMTP**, and enter the SMTP host, port, security mode, username, password, sender identity, and workspace assignments.
5. Click **Save**, then use **Send Test Email** from the connection row immediately.

If the provider requires an app-specific password, use that instead of the normal mailbox password. Some providers block normal password login for SMTP.

## Testing and Troubleshooting

Custom SMTP test failures usually come from one of a few setup mismatches:

- **Connection refused:** the host or port is wrong, or the server blocks outside connections.
- **Authentication failed:** the username, password, or app password is wrong.
- **TLS or STARTTLS error:** the security mode does not match the port or server configuration.
- **Sender not allowed:** the From email is not permitted for the SMTP account.
- **Message accepted but not received:** check spam folders, provider logs, sending limits, and whether the server silently held or rejected the message.

If your SMTP provider can send bounce or complaint events to a custom webhook URL, click **Email Delivery Connections**, click **Webhooks** on the Mailrith connection, and copy the unified delivery-event endpoint. Configure the provider to send bounce and complaint-style events there. If the provider cannot send those events, you will need to monitor bounces and complaints through the provider's own tools.

If the provider returns SMTP codes, deferrals, or throttling messages, use [SMTP Errors, Deferrals, and Throttling](https://mailrith.com/guides/smtp-errors-deferrals-and-throttling.md) to decide whether the issue is temporary, permanent, or rate-related.

## Related Guides
- [Email Delivery Connections](https://mailrith.com/docs/email-delivery-connections.md): Mailrith is provider-agnostic — you connect your own email delivery service and Mailrith handles campaign logic, subscriber targeting, and engagement tracking on top of it.
- [Broadcasts](https://mailrith.com/docs/broadcasts.md): Broadcasts are for newsletters, product launches, announcements, and any message that goes out once to selected subscribers — compose, target, test, and send or schedule from a single workflow.
- [Sequences](https://mailrith.com/docs/sequences.md): Sequences send a series of emails over time as subscribers progress through the steps — ideal for onboarding, nurture campaigns, and educational content that should unfold over days or weeks.
