# Sending over SMTP

> Send email through Reggio Digital from anything that speaks SMTP: a shop, a CRM, a site hosted elsewhere. Credentials, ports and the DNS a sending domain needs.

Source: https://reggiodigital.com/developers/smtp

Plenty of software that sends email cannot call an API but does have an SMTP setting: an online shop, a booking system, a CRM, a website hosted somewhere else. Point that setting at us and the mail goes out from the business's own verified domain.

If you are writing the code yourself, the [transactional email API](https://reggiodigital.com/developers/email) gives you more: scheduling, batches, templates and a lookup for every message.

## Where the settings are

SMTP credentials belong to one verified sending domain. In the dashboard, open [Sending domains](https://reggiodigital.com/domains/sending), pick the domain and choose to connect an app. That page lists everything the software will ask for, ready to copy:

| Setting | What to enter |
| --- | --- |
| Server or host | Copy it from the domain's page. |
| Port | `587` |
| Security or encryption | `STARTTLS`, sometimes labelled TLS |
| Username | Copy it from the domain's page. |
| Password | Copy it from the domain's page. |
| From address | Any address on that domain, such as `orders@yourdomain.com`. |

Only people with access to Email on the account can open that page. The credentials are created the first time someone opens it, so it can take a moment the first time.

## What the credentials can do

They send as any address on the one domain they were issued for, and nothing else. If the software needs to send from two domains, verify both and use each domain's own credentials.

Keep the password in the software's settings and nowhere else. If it leaks, [open a ticket](https://reggiodigital.com/tickets/create) and we will replace it; the old password stops working as soon as we do.

## The DNS a sending domain needs

A domain has to be verified before it can send, over SMTP or the API. When the business adds a domain in [Sending domains](https://reggiodigital.com/domains/sending), the dashboard lists the exact records to add at their DNS provider, and checks them for you. There are three kinds:

- **Signing records** (`CNAME` or `TXT` under `_domainkey`), which let receiving servers check a message really came from the domain and was not changed on the way.
- **A return-path subdomain** with an `MX` record and an SPF `TXT` record, where bounce reports come back to us.
- **An SPF `TXT` record on the domain itself**, which some receivers, including Apple's Hide My Email relay, check separately.

Copy the values from the dashboard rather than from here. They are specific to each domain.

If the domain already sends through another provider, both can be set up at once. Nothing has to be switched off first. If a name already has an SPF record, merge ours into it rather than adding a second one: two SPF records on one name make both fail.

A DMARC record is recommended on the main domain but not required. The dashboard reports what it finds.

## When a message does not arrive

Check the from address first: it has to be on the domain the credentials belong to. Then check the software is set to STARTTLS on port 587. If both are right and mail still does not arrive, open a ticket with the time it was sent and the recipient, and we will trace it.
