Agencies running websites for many clients need each site’s email (contact forms, order receipts, password resets) to arrive reliably and from the client’s own domain. The setup that scales is one email provider, every client domain verified with its own DNS records, one sending credential per site locked to that client’s domain, and a scheduled health check across all of them. That replaces a pile of mailbox passwords and hosting mail that nobody can debug.
Why client site email breaks
Most agency email problems come from one of these:
- PHP
mail()on shared hosting. The hosting server’s IP is shared with many sites, rarely has DKIM for the client domain, and is often blocklisted. - A staff mailbox used as SMTP. Someone changes their password or enables MFA, and the website stops sending without telling anyone.
- DNS changes. A client moves DNS to a new provider and the DKIM records do not come along.
- No logs. When a client asks “did that form submission email go out?”, there is no answer.
The setup that scales
| Piece | How |
|---|---|
| Provider | One transactional email provider for every client site |
| Domains | Each client domain verified: DKIM, SPF on a bounce subdomain, DMARC |
| Credentials | One key per site, sending-only, locked to that client’s domain |
| Configuration | Every site uses the same SMTP host or API, with its own key |
| Monitoring | Delivery and bounce webhooks, tagged per client, plus a regular DNS health check |
| Access | Your team by role; clients get read-only visibility if they want it |
With keys locked to a domain, a key leaked from one client’s old WordPress plugin cannot send as any other client.
Best practices
- Collect DNS access early. Put “add email DNS records” into your launch checklist with the client’s IT contact named.
- Use a subdomain for bounces. SPF on
send.client.comleaves the client’s root SPF alone. See SPF too many lookups for why that matters. - Name keys by client and site.
acme-wordpress-prodtells you what breaks if you revoke it. - Tag every email with the client. Reporting per client becomes a filter, not a project.
- Secure the team account. Require two-factor for everyone, use roles, and keep an audit log of who changed what.
- Separate client marketing. Newsletters belong on a subdomain so they cannot damage contact form delivery.
Example: a client contact form notification
From: Website <website@client-example.com>
Reply-To: Sam Buyer <sam@example.com>
To: office@client-example.com
Subject: New enquiry from the website: kitchen refit
Name: Sam Buyer
Email: sam@example.com
Message: Can you quote for a kitchen refit in March?
Sent from client-example.com/contact
The visitor goes in Reply-To, never in From. The contact form backend guide covers spam protection.
Moving a client off hosting mail
Switching a live site is low risk if you go in this order:
- Add the client domain to the new provider and publish its DKIM and return path records. Nothing changes for current mail yet.
- Wait for verification, then add or adjust DMARC if the domain has none.
- Change the site’s SMTP or API settings to the new key and send a test from the live form.
- Remove the old provider’s records only after a week of clean sending.
How Mailcandor fits an agency
Mailcandor includes unlimited domains on every plan and charges per email, not per seat or domain (pricing). Every site can use the SMTP relay (smtp.mailcandor.com, port 465 or 587, username mailcandor, password a key) or the HTTP API. Sending keys can be locked to one domain. Team accounts have roles (admin, developer, billing, viewer), a team-wide two-factor requirement, SAML or OIDC single sign-on, and an audit log; see security.
This script checks every domain on your account and prints anything that needs fixing, using the deliverability coach’s health endpoint. Run it weekly from a scheduled job.
const API = 'https://api.mailcandor.com/v1';
const headers = { Authorization: `Bearer ${process.env.MAILCANDOR_KEY}` }; // full-access key
async function get(path) {
const res = await fetch(API + path, { headers });
const data = await res.json();
if (!res.ok) throw new Error(`${data.error.type}: ${data.error.message}`);
return data;
}
let after = '';
do {
const page = await get(`/domains?limit=100${after && `&after=${after}`}`);
for (const d of page.data) {
const health = await get(`/domains/${d.id}/health`);
const fixes = health.dns.filter((f) => f.level === 'fix');
if (d.status !== 'verified' || fixes.length) {
console.log(`${d.name} (${d.status})`);
for (const f of fixes) console.log(` - ${f.title}: ${f.detail}`);
}
}
after = page.has_more ? page.data.at(-1).id : '';
} while (after);
Each finding has a level (ok, tip or fix), a title and a plain-English detail, so the output can be pasted straight into a message to the client’s IT contact. For real-time warnings, subscribe a webhook to domain.updated and email.bounced.
Handing over to a client
When a client leaves or takes email in-house, delete their domain from your account. Keys locked to it are deleted with it, and sent email history stays for your records. Give them the list of DNS records to keep or replace, so their next provider’s records go in before yours come out.
Common pitfalls
- Personal mailbox passwords in site configs. They expire and leave when staff leave.
- One key on every site. Revoking it takes down every client at once.
- Visitor addresses in From. It fails DMARC and lets attackers spoof through your forms.
- No DMARC on client domains. Add at least
p=nonewith reporting so you see problems before clients do. - Forgetting staging sites. Staging should not email real customers. See email testing and staging.