# Set Up Custom SMTP

> Use Custom SMTP when your email delivery service is not one of Mailrith's built-in options and supplies standard SMTP login details. Enter the server host, port, security mode, and login details to connect it.

- Human page: https://mailrith.com/docs/setup-custom-smtp
- Markdown page: https://mailrith.com/docs/setup-custom-smtp.md
- Category: Campaigns & Delivery
- Reading time: 8 min read
- Last updated: 2026-07-13
- Related keywords: Set Up Custom SMTP, Set Up Custom SMTP documentation, Campaigns & Delivery, Campaigns & Delivery documentation, Mailrith documentation, Mailrith help, Before You Start, Mailrith Fields, SMTP Server Setup, Testing And Troubleshooting, Email Delivery Connections, Broadcasts, Sequences

## AI Agent Notes
- Use this article as step-by-step Mailrith product guidance, not as legal, financial, or deliverability advice unless the article says so.
- Preserve exact Mailrith UI labels from the steps when explaining a workflow.
- Prefer Mailrith's product term Subscribers when referring to people on an email list.

## What this guide covers
Connect an email delivery service with its host, port, security mode, and login details when Mailrith does not have a built-in connection.

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

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

The Email Delivery Connections page lists every connected service. From here you can add a connection, send a test email, view delivery-event links, and assign connections to workspaces.

## Before You Start

Use Custom SMTP when your email delivery service is not one of Mailrith's built-in options and the service supplies standard SMTP login details. The service might be a corporate mail relay, a self-managed server, or another email delivery service.

Ask your mail administrator or email delivery service for these SMTP settings before you create the connection:

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

Custom SMTP settings vary between email delivery services. If you are not sure which host, port, or security mode to use, confirm those settings with the service before you run repeated tests.

For an explanation of how Mailrith and an email delivery service work together, read [Email Delivery Services](https://mailrith.com/guides/smtp-and-delivery-providers.md). If you do not know which security mode or port the server requires, read [TLS and Secure Sending](https://mailrith.com/guides/tls.md) before you test the connection.

## 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 the email delivery service gave it to you.
- **Port:** the port number that the SMTP server uses.
- **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 email address the SMTP account is allowed to use.
- **Workspaces:** the Mailrith workspaces that can send email through this SMTP server.

## SMTP Server Setup

1. Confirm that the SMTP server allows authenticated sending from Mailrith.
2. Create a sending username and password, or collect the existing sending username and password from the email delivery service.
3. Confirm that the SMTP server allows that username to send from the From email.
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 right after Mailrith saves the connection.

If the email delivery service requires an app-specific password, enter that password instead of the normal mailbox password. Some services block normal password login for SMTP.

## Testing And Troubleshooting

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

- **Connection refused:** the host or port is wrong, or the server blocks connections from outside its network.
- **Authentication failed:** the username, password, or app password is wrong.
- **TLS or STARTTLS error:** the selected 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, delivery events, sending limits, and whether the service held or rejected the message without returning a visible error.

If your email delivery service can send bounce or complaint events to a custom webhook URL, click **Email Delivery Connections**, click **Webhooks** on the Mailrith connection, and copy the delivery-event link. Configure the service to send bounce and complaint events to that link. If the service cannot send those events, monitor bounces and complaints in the service's own tools.

For best results, configure the email delivery service or relay to include the original message headers in those webhook events. Mailrith adds `X-Mailrith-*` headers to each sent message so returned events can be matched to the right workspace, Subscriber, and email when those headers are forwarded.

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

## Related Guides
- [Email Delivery Connections](https://mailrith.com/docs/email-delivery-connections.md): You connect your own email delivery service. Mailrith then manages subscribers, campaigns, follow-up, and reports while that service sends the emails.
- [Broadcasts](https://mailrith.com/docs/broadcasts.md): Use broadcasts for newsletters, product launches, announcements, and any message you send once to selected subscribers. Compose, target, test, and send or schedule the campaign in one workflow.
- [Sequences](https://mailrith.com/docs/sequences.md): Sequences send a series of emails over time as subscribers move through the steps. Use sequences for onboarding, nurture campaigns, and educational content that should be sent over days or weeks.
