Use-cases

How to send email from your customers' domains in a multi-tenant app

Short answer

To send email from your customers' own domains, add each customer's domain to your email provider by API, show them the DKIM, SPF and return path records to publish, poll until the domain verifies, and only then switch their From address to it. Until then, send from your own domain with their name and a Reply-To. Use a separate sending key per tenant, locked to that domain, so one tenant can never send as another.

Last checked 16 November 2026

To send email from your customers’ own domains, your app adds each customer’s domain to your email provider by API, shows the customer the DNS records to publish, checks until the domain verifies, and then sends their mail from it. Until then, you send from your own domain with their name. Each tenant gets its own credentials, locked to its own domain, so no tenant can ever send as another.

Why send from the customer’s domain?

Booking platforms, invoicing tools, help desks, e-commerce builders and CRMs all send mail on behalf of customers. Sending from bookings@clinic-example.com instead of noreply@yourplatform.com means:

  • Recipients recognize the sender and open the email.
  • Replies go to the customer naturally.
  • DMARC aligns with the domain in the From header, which receivers check.
  • One customer’s bad list affects their domain’s reputation more than everyone else’s.

The two-stage approach

Stage From Reply-To Notes
Before verification Clinic Example <clinic-example@mail.yourplatform.com> hello@clinic-example.com Works on day one, passes DMARC on your domain
After verification Clinic Example <bookings@clinic-example.com> Optional Fully branded, aligned with the customer’s domain

Never put the customer’s domain in the From field before it is verified. It will fail DMARC, and if they publish p=reject, the mail will be refused.

The DNS records customers publish

A typical provider gives each domain:

  • DKIM: usually CNAME or TXT records under _domainkey, so receivers can verify the signature. See DKIM.
  • Return path: an MX and an SPF TXT record on a sending subdomain such as send.clinic-example.com, so bounces come back to the provider and SPF aligns. See return path.
  • DMARC advice: if the domain has no DMARC record, suggest starting with p=none and a reporting address.

Because the SPF record goes on a subdomain, the customer’s existing SPF record on the root domain does not change. That avoids pushing them over the SPF 10-lookup limit.

Best practices for multi-tenant sending

  • Automate onboarding. A “Send from your domain” page in your app: enter domain, see records, press “Check now”.
  • Show records in copyable form, with the exact host names their DNS provider expects. Many providers append the domain automatically, which causes send.clinic-example.com.clinic-example.com.
  • Re-check periodically. Records get deleted during DNS migrations.
  • Isolate tenants. One key per tenant, locked to their domain. Tag every email with the tenant id.
  • Watch per-tenant bounces and complaints. One tenant importing a bad list should be paused by you before it affects everyone.
  • Put sending rules in your terms. Your acceptable use obligations pass through to your tenants.

Example tenant email

From: Clinic Example <bookings@clinic-example.com>
Subject: Your appointment on 20 November at 10:30

Hi Sam,

Your appointment with Dr. Lee is confirmed for Thursday 20 November at 10:30.
Address: 4 Example Street, Springfield

Need to change it? https://clinic-example.com/booking/8841

Automating customer domains with Mailcandor

Mailcandor includes unlimited domains on every plan, with no domain fees (see pricing). Adding a domain returns three DKIM CNAMEs, SPF and a bounce MX on send.<domain>, and DMARC advice. If the customer already uses send. for another service, pass custom_return_path with another name, such as bounces.

This script runs when a tenant enters their domain, and again when they press “Check now”:

const API = 'https://api.mailcandor.com/v1';
const admin = {
  Authorization: `Bearer ${process.env.MAILCANDOR_KEY}`, // a full-access key
  'Content-Type': 'application/json',
};

async function call(method, path, body) {
  const res = await fetch(API + path, { method, headers: admin, body: body && JSON.stringify(body) });
  const data = await res.json();
  if (!res.ok) throw new Error(`${data.error.type}: ${data.error.message}`);
  return data;
}

// 1. Tenant enters their domain: add it and show them the records.
export async function addTenantDomain(tenant, name) {
  const domain = await call('POST', '/domains', { name });
  await saveTenant(tenant.id, { domainId: domain.id, status: domain.status });
  return domain.records.map((r) => ({ type: r.type, name: r.name, value: r.value, priority: r.priority, required: r.required }));
}

// 2. Tenant presses "Check now": verify, and create a locked key once verified.
export async function checkTenantDomain(tenant) {
  const domain = await call('POST', `/domains/${tenant.domainId}/verify`);
  if (domain.status === 'verified' && !tenant.sendKey) {
    const key = await call('POST', '/api-keys', {
      name: `tenant-${tenant.id}`,
      permission: 'sending',
      domain_id: domain.id,
    });
    await saveTenant(tenant.id, { status: 'verified', sendKey: key.token }); // store encrypted
  }
  return domain.records.map((r) => ({ name: r.name, status: r.status, found: r.found }));
}

saveTenant is your own storage. The found field shows what DNS returned at the last check, which makes “why is it not verifying?” support tickets short. Subscribe to the domain.updated webhook to hear about status changes without polling. If a domain is already on another Mailcandor team, adding it returns 409 domain_taken.

When the tenant’s mail is sent, use their key: it can only send, and only from their domain. A tenant key that leaks cannot send as any other tenant.

Common pitfalls

  • Using the customer’s domain before it verifies. DMARC failure, then rejection.
  • One shared key for every tenant. A leak, or a bug that mixes up tenants, sends as the wrong brand.
  • No per-tenant monitoring. Tag by tenant and watch bounce and complaint rates for each.
  • Asking customers to edit their root SPF. Use a provider that puts SPF on a subdomain.
  • Forgetting removal. When a tenant leaves, delete their domain so its keys are deleted too.
  • Skipping warm-up. A newly verified tenant domain has no sending history. Ramp a large tenant’s volume up over days rather than moving everything on the first afternoon.

Questions

Can I send email as my customer's domain without their DNS access?

Not properly. Without DKIM and SPF records on their domain, receiving servers cannot verify the mail and DMARC will fail. Send from your own domain with their name in the From field until they publish the records.

Do customers need to change their MX records?

No, not for sending. They add a few DKIM CNAME records and records on a sending subdomain. Their existing mailboxes keep working.

How many domains can one account have?

It depends on the provider; some charge per domain or cap them by plan. Mailcandor includes unlimited domains on every plan.

What is a white label email API?

It usually means sending email that carries your customer's brand and domain rather than yours, with nothing in the visible message naming your platform. Verified customer domains are the core of it.

What if the customer's domain fails verification later?

Records can be removed by accident. Re-check domains regularly, and fall back to sending from your own domain with the customer's name until they fix it.

Related

Send with someone on your side.

Unlimited domains on every plan, a person before any block, and 3,000 emails a month free. Tell us what you send and we set you up within one business day.