Cloudflare Email Sending
Onboard a sending domain in Cloudflare Email Sending and connect it to AppCore for email sign-in codes and transactional email.
On this page
AppCore sends email through Cloudflare's native Email Sending binding on your environment's runtime Worker. It is
used for email one-time sign-in codes (email_otp) and transactional messages (email_transactional). Every message
is rendered with your app's branding and a plain-text fallback, sent only to verified contacts, checked against a
suppression list, and counted against your daily cap.
Email Sending is a Cloudflare beta and is transactional only: the allowed purposes are authentication, security and transactional, and AppCore always refuses marketing email on this connection, whatever the configuration says. Console paths are as of 2026-11.
Warning
Not yet automatic: the send binding. The runtime looks up a send_email binding by the connection's
binding_name (default EMAIL). The provisioner does not add that binding to runtime Workers yet, so your platform
operator adds it per environment. Without it, email is off: email_otp is not advertised in /v1/config/public,
POST /v1/auth/otp/request returns 503 FEATURE_UNAVAILABLE, and nothing is sent.
Warning
Not yet enabled:
- An email test send. The operator test send exists for push only. Because email one-time codes are offered in
development and staging only once this connection is
sandbox_ready, and that needs evidence for theemail-deliverycheck, you currently need your platform operator to complete that step. - Bounce and complaint webhooks. Permanent rejects returned by the send call are added to the suppression list; asynchronous bounce events are not processed yet.
- Not provider-verified: the binding's request shape is tested against a fake binding only, because the product is in beta.
Before you begin
- A domain (or subdomain, such as
mail.example.com) whose DNS is on Cloudflare, in the Cloudflare account that hosts your AppCore runtime. Send bindings only work for domains onboarded in the same account as the Worker. On a shared AppCore installation this is the platform operator's account; agree with them how to onboard your domain. - DNS administrator access to that zone.
- A monitored support mailbox for
reply_to. - Sending to arbitrary recipients needs the Workers Paid plan on that account; daily capacity depends on the account's Email Sending quota.
Steps
- Onboard the domain. Cloudflare dashboard → Compute → Email Service → Email Sending (on some accounts: dashboard → your zone → Email → Email Sending). Add your sending domain or subdomain.
- Add the DNS records it lists (SPF, DKIM, DMARC, bounce). Review them first: if the domain already receives or sends mail elsewhere, merge into your existing SPF record instead of adding a second one, and keep your existing MX records.
- Wait for verification to show the domain as ready.
- Ask your platform operator to bind Email Sending to this environment's runtime Worker under the name you will
put in
binding_name(defaultEMAIL), restricted to your from-address if they prefer. - In AppCore, open Setup and connections → Connections, create a Cloudflare transactional Email Sending connection, fill in the fields below and save.
- Run Check syntax, then Read-only check, then Activate.
- If you offer Sign in with Apple, register the same sending domain with Apple's private email relay so mail reaches Hide My Email addresses.
Paste into AppCore
| AppCore field | Where to find it | Secret? |
|---|---|---|
sending_domain | Email Sending → your onboarded domain, exactly as shown | Public |
from_address | Choose an address on that domain, for example no-reply@mail.example.com | Public |
from_name | Your app or company name as users know it | Public |
reply_to | A monitored support address (optional) | Public |
daily_cap | Maximum emails per day for this app and environment, within your account quota | Public |
binding_name | The binding name your operator used (uppercase letters, digits and _; default EMAIL) | Public |
purpose_allowlist | Leave the platform default. marketing is removed even if listed | Public |
domain_verification, event_subscription_ref | Filled by the platform | Public |
There are no secrets on this connection: the binding itself authorizes sending.
Verify
- Read-only check passes with
EMAIL_DNS_AUTH_PRESENT: AppCore looked up public DNS and found an SPF record onsending_domainand a DMARC record at_dmarc.<sending_domain>. It sends nothing and does not check the binding or your quota. - Once the connection is
sandbox_ready(development, staging) orproduction_ready(production) and the binding is present,email_otpappears inauth_methodsandemail_transactionalinmessaging_channelsofGET https://<your-api-host>/v1/config/public. - Sign in with an email one-time code on a test build. The code is 6 digits, valid for 5 minutes, with 60 seconds before a resend and 5 attempts.
- Sends appear in Messaging and engagement → Deliveries.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
EMAIL_SPF_MISSING | No v=spf1 TXT record on the sending domain | Add the SPF record Email Sending shows (merge with an existing one) |
EMAIL_DMARC_MISSING | No v=DMARC1 TXT record at _dmarc.<domain> | Add the DMARC record |
PROVIDER_UNREACHABLE | DNS lookup failed | Retry later |
email_otp missing from auth_methods although the connection is active | Binding not present on the runtime, from_address empty, the connection is only pending_approval in staging, or email is switched off for this environment | Ask your operator to confirm the binding and kill switch; complete sandbox evidence |
503 FEATURE_UNAVAILABLE on POST /v1/auth/otp/request | Email delivery is not ready (same causes) | As above. AppCore never creates a code it cannot deliver |
429 on OTP request | Send limits: per address per hour, per IP per hour, or the 60-second resend gap | Wait for the retry_after_seconds in the response |
| Mail lands in spam | DKIM/DMARC not aligned, or new domain reputation | Check every record Email Sending lists; warm up gradually |
| Daily sending stops | daily_cap or the Cloudflare account quota reached (email_daily_limit) | Raise daily_cap within quota; keep another sign-in method enabled |
Marketing email refused (email_marketing_disallowed) | This connection is transactional only | Use push or in-app messages for campaigns |