# How SMTP Relay works

> How SMTP Relay sends your applications' mail over SMTP or HTTPS, what its plan sets, and what the Overview tab shows.

Source: https://docs.coritan.com/mail/smtp-relay/

In the dashboard:

- /dashboard/mail/…/overview: https://www.coritan.com/dashboard/mail

SMTP Relay sends the mail your software writes: receipts, password resets, alerts and newsletters. Your application hands each message to the relay, and the relay signs it for your domain, delivers it and records what happened. SMTP Relay only sends. To receive mail on a domain, use [Mail Hosting](/mail/mail-hosting/).

## Two ways to send

Over SMTP
: Point any SMTP library or application at the relay's SMTP host on port 587 (STARTTLS) or 465 (TLS), and sign in with an *SMTP credential*: a username and password the relay creates for one application. See [Send over SMTP with credentials](/mail/smtp-relay/credentials/).

Over HTTPS
: Post a JSON message to the send API with an *API key* in the `X-Api-Key` header. See [Send email over HTTPS](/mail/smtp-relay/send-with-the-api/).

Both need a verified *sending domain* on the relay, and the From address must be on it. The HTTPS API sends through one of the relay's SMTP credentials, so create at least one credential even if you only use the API.

## How a message is handled

1. The relay checks the sender, the monthly allowance and the hourly limit, and drops any recipient on the [suppression list](/mail/smtp-relay/suppressions/).
2. It signs the message with your domain's DKIM key and delivers it.
3. Each step becomes an *event*: accepted, delivered, deferred, bounced or complaint. You can [look events up](/mail/smtp-relay/events/) for up to 90 days, or [receive them with webhooks](/mail/smtp-relay/webhooks/).
4. A bounce or a spam complaint adds the address to the suppression list, so the relay stops sending to it.

Each message is either *transactional* or *marketing*. Marketing mail gets one-click unsubscribe headers. See [Transactional and marketing mail](/mail/smtp-relay/message-categories/).

## What the plan sets

- Emails a month: the plan's allowance. Paid plans accept a buffer beyond it; the free plan stops at its allowance. The count resets on the 1st of each month.
- Sending domains: a number, or unlimited. An unlimited plan still stops at 1,000 domains.
- SMTP credentials: a number, or unlimited. An unlimited plan still stops at 200 credentials.
- Dedicated IPs: some plans include a dedicated sending address, and a relay whose plan sends 100,000 emails a month or more can add one.

The *hourly limit* is separate from the plan. Every new relay starts with a small one, and it rises as the relay sends clean mail. [How SMTP Relay sending limits work](/mail/smtp-relay/sending-limits/) covers the allowance, the buffer and the hourly limit.

## What the Overview tab shows

In the dashboard, go to **Email**, open the relay, then the **Overview** tab.

The three figures at the top are **Emails this month** against the allowance, and the **Sending domains** and **SMTP credentials** used against the plan. Once the relay has sent 80% of its plan's emails for the month, an alert above them says how much is left; see [Sending limits](/mail/smtp-relay/sending-limits/#what-happens-near-the-allowance).

**Deliverability**
: The bounce and complaint rates over the recent days the card names, the relay's health checks, and the **Default message category**. See [Sending reputation and deliverability](/mail/smtp-relay/deliverability/).

**SMTP endpoint**
: The **SMTP** host name to connect to, with its ports.

**Recent activity**
: The latest events from the last seven days. **All events** opens the **Events** tab.

**Service**
: The relay's **Status**, **Plan**, **Region**, the date it **Renews**, when it was **Created** and its **Service ID**.

**Tags**
: Labels you add to find the relay. See [Tags](/get-started/tags/).

**Hourly limit**
: The **Current limit**, the **Next step** it rises to, and when and how it was **Set**. **Request limit increase…** asks for more; see [Request a higher hourly limit](/mail/smtp-relay/request-a-higher-limit/).

**Sending IPs**
: Whether the relay sends from addresses we share between customers or from dedicated addresses. Each dedicated address shows its reverse DNS name, its hourly cap, and a **Warming up** badge while it warms up. **Order dedicated IP** opens the order page for another dedicated address where the plan allows one ([Order a dedicated sending IP](/mail/order-a-mail-service/#order-a-dedicated-sending-ip)).

**Domains**
: Each sending domain and its verification status.

## With the API

Read the relay's summary:

```bash
curl https://api.coritan.com/api/v1/client/smtp-relay/4812 \
  -H "Authorization: Bearer $CORITAN_TOKEN"
```

The fields you need most:

`kind`
: `relay` for SMTP Relay.

`status`
: `active` once the relay is ready.

`month_to_date_sent`
: Emails counted this month.

`limits`
: The allowance, the buffer, what is left, and the hourly limit with its next step. [Sending limits](/mail/smtp-relay/sending-limits/#with-the-api) lists every field.

`counts`
: `relay_credential` and `domains`, the credentials and sending domains the relay holds.

`default_category`
: `transactional` or `marketing`, the category of a message that does not set one.

`dedicated_ips`
: Each dedicated address, with `address`, `ptr`, `warming_up` (`true` until its warm-up ends), `hourly_limit`, `enabled` and `addon_service_id` (set when you bought it as an add-on).

`cluster`
: The region the relay runs in: `region`, its code, and `region_name`, such as `Frankfurt`, or `null` when we have no name for it.

`hostnames.smtp_host`
: The host to connect to over SMTP.

`sending_frozen`, `review_flag`, `reputation_note`
: Whether sending is paused or under review, and why.

## API

- `GET /api/v1/client/smtp-relay/{service_id}`: Get summary (https://docs.coritan.com/api/reference/client/mail/smtp-relay/#op-get-api-v1-client-smtp-relay-service-id)
