---
name: business-email
description: Set up business email on the user's domain with Google Workspace, Microsoft 365 or Zoho Mail. Adds the provider's MX and SPF in one call for domains on StableDomains, then walks through DKIM and DMARC with the exact records from each provider's official docs, and verifies everything. No domain yet? Finishes with a buy link (card or USDC). Use when the user asks to "set up email on my domain", "connect Google Workspace / Outlook / Zoho", "add MX records" or "fix SPF/DKIM/DMARC for my mail".
license: MIT
metadata:
  author: StableDomains
  homepage: https://stabledomains.net/skills/business-email
  version: "1.0.0"
---

# Business Email

you@yourdomain.com working on Google Workspace, Microsoft 365 or Zoho Mail, with SPF, DKIM and DMARC passing.

API base: `https://stabledomains.net/api/v1`. Add `utm_source=skill-business-email` to every call and link.
MCP (`https://stabledomains.net/api/mcp`): `apply_dns_template`, `set_dns` (mode `merge`), `get_dns`, `dns_email_check`.
Auth for DNS changes: `Authorization: Bearer sd_live_…` (dashboard), or the `x-order-manage` header from the order page.

## 0. No domain yet?
Check and buy first: `GET /api/v1/check?domains=yourbrand.com,yourbrand.co&utm_source=skill-business-email` then send the `buy_url` (e.g. `https://stabledomains.net/basket?add=yourbrand.com&utm_source=skill-business-email`). Card, Apple Pay or USDC/USDT, guest checkout.

## 1. Before changing anything
- The user signs up with the provider and adds the domain there. The provider shows a **verification TXT** (Google `google-site-verification=…`, Microsoft `MS=ms…`, Zoho `zoho-verification=…`). Add it first:
  ```bash
  curl -s -X PATCH https://stabledomains.net/api/v1/domains/yourbrand.com/dns -H "Authorization: Bearer $SD_KEY" \
    -H "content-type: application/json" -d '{"records":[{"type":"TXT","name":"@","value":"<verification value>"}]}'
  ```
- Look at current records: `GET /api/v1/domains/yourbrand.com/dns`. If other services already send mail (newsletter, app, helpdesk), note their SPF `include:`s: you will merge them in step 3.

## 2. MX + SPF in one call (free)
```bash
curl -s -X POST https://stabledomains.net/api/v1/domains/yourbrand.com/dns/template \
  -H "Authorization: Bearer $SD_KEY" -H "content-type: application/json" \
  -d '{"template":"google-workspace"}'        # or "microsoft-365", or "zoho-mail" with "params":{"region":"eu"}
```
It replaces only existing MX records and the root SPF record; everything else stays. What it writes:

| Provider | MX | SPF (TXT @) | Extra |
|---|---|---|---|
| Google Workspace | `smtp.google.com`, priority 1 | `v=spf1 include:_spf.google.com ~all` | — |
| Microsoft 365 | `<domain-with-dashes>.mail.protection.outlook.com`, priority 0 | `v=spf1 include:spf.protection.outlook.com -all` | CNAME `autodiscover` → `autodiscover.outlook.com` |
| Zoho Mail | `mx.zoho.com` 10, `mx2.zoho.com` 20, `mx3.zoho.com` 50 (region `eu`/`in`/`com.au` uses that domain) | `v=spf1 include:zohomail.com ~all` | — |

Microsoft 365: if the admin center shows a different MX value for the domain, use that exact value (PATCH it in place of the template's).

## 3. One SPF record only
A domain must have exactly one `v=spf1` record. If other senders exist, merge them:
`v=spf1 include:_spf.google.com include:<other sender> ~all`, then PATCH it with the old value in `remove`.

## 4. DKIM (from the provider's admin console)
| Provider | Where | Record to add |
|---|---|---|
| Google | Admin console → Apps → Google Workspace → Gmail → Authenticate email → Generate new record | TXT `google._domainkey` = `v=DKIM1; k=rsa; p=…` (use 2048-bit; if saving fails, generate 1024-bit) |
| Microsoft 365 | Defender portal → Email authentication settings → DKIM | two CNAMEs: `selector1._domainkey` and `selector2._domainkey` → the values Microsoft shows (`selector1-<domain-with-dashes>._domainkey.<tenant>…`) |
| Zoho | Admin Console → Domains → Email configuration → DKIM → Add selector | TXT `<selector>._domainkey` = the value Zoho shows |

Add with PATCH (`{"records":[{"type":"TXT","name":"google._domainkey","value":"v=DKIM1; k=rsa; p=…"}]}`), wait a few minutes, then press **Start authentication / Enable / Verify** in the provider console.

## 5. DMARC
```json
{"records":[{"type":"TXT","name":"_dmarc","value":"v=DMARC1; p=none; rua=mailto:dmarc@yourbrand.com"}]}
```
Start at `p=none` for a week, then `p=quarantine`, then `p=reject` once reports look clean.

## 6. Verify (free, no key)
```bash
curl -s "https://stabledomains.net/api/v1/tools/dns?domain=yourbrand.com&dkim_selectors=google,selector1,selector2&utm_source=skill-business-email"
```
Pass when `mx` shows the provider, one `spf`, `dkim[].key_present` is true for the provider's selector and `dmarc` is set. DNS changes usually show within minutes; allow up to an hour.

## Sources (official docs)
- Google MX `smtp.google.com`: https://support.google.com/a/answer/174125
- Google SPF: https://support.google.com/a/answer/10685031 · DKIM: https://support.google.com/a/answer/174124 · DMARC: https://support.google.com/a/answer/2466563
- Microsoft 365 DNS records (MX, SPF, autodiscover): https://learn.microsoft.com/en-us/microsoft-365/admin/get-help-with-domains/create-dns-records-at-any-dns-hosting-provider
- Microsoft DKIM: https://learn.microsoft.com/en-us/defender-office-365/email-authentication-dkim-configure
- Zoho MX: https://www.zoho.com/mail/help/adminconsole/configure-email-delivery.html · SPF: https://www.zoho.com/mail/help/adminconsole/spf-configuration.html

## Rules
1. Show the user the records before applying; apply only after their yes. Use a dry run (`"dry_run":true` on PATCH) when unsure.
2. Never use `PUT` (full replace) for mail setup; use the template or `PATCH`.
3. Copy DKIM keys and Microsoft values exactly as the provider shows them; never invent them.
4. Hosted DNS supports A, AAAA, CNAME, MX, TXT and NS. If a provider asks for SRV, it needs custom nameservers.
