How to send email from your app

An app you build on Playcode Cloud can send real email - sign-up confirmations, password resets, receipts, notifications - without signing up for a mail provider. This article is the setup half: where your mail comes from, and what changes when you verify a domain of your own. What you are allowed to send is a separate article, What emails can your app send.

What works with no setup

Sending is built into Playcode Cloud. There is no provider account to create and no API token to paste. When a Cloud project is created, Playcode puts the mail credentials into the app's environment for you, and the app's code calls one service.

A new Cloud app is already wired for it. Out of the box it sends a welcome email when someone registers, and a password-reset email when someone asks for one - you do not have to write that code. If you want another message, describe it to the AI agent like any other feature.

This is a Cloud feature. You will find the controls under Settings > Project > Email on a Cloud project. Static sites do not have the pane. See Cloud projects for the difference.

On the Free plan, every message is captured instead of delivered: it is stored with working links so you can build and test the whole flow, but nothing reaches a real inbox. Real delivery is included from Pro, and on Max.

Where your mail comes from

Every message needs a From address. Playcode gives you two, and you do not have to choose the second one to start.

The shared Playcode address

By default your app sends from an address Playcode assigns it on a shared Playcode domain. Your app's own name stays on the message as the sender name, and your own address is used as Reply-To, so replies still reach you. This needs zero setup.

The trade-off is that the shared address is shared. It carries mail for many apps, so Playcode keeps it strictly to people who asked for it: your team, and outside addresses that have confirmed they want mail from your project. It never carries mail to strangers.

Your own verified domain

Once you verify a domain you control, your app can send from an address at that domain - any address you like, for example hello@send.yourdomain.com. The message is signed as yours. Your brand is on it, not ours.

What verifying a domain unlocks

Verifying a sending domain changes two things:

  • Your own From address. Mail goes out from your domain instead of the shared Playcode one.
  • Send to anyone. Your app can deliver to addresses that never confirmed anything - the people who sign up on your site. Every message to someone outside your team carries a one-click unsubscribe link, which is what large mailbox providers expect.

Send to anyone turns on only when all three of these are true:

  1. The project is on a paid plan - Pro or Max.
  2. The project has at least one sending domain in the Verified state.
  3. You turned Send to anyone on yourself, in Settings > Project > Email.

Each one is checked as your app sends, so this is reversible in both directions. If the domain falls out of Verified, or you switch Send to anyone off, delivery goes back to your confirmed recipients, from the shared address. If the paid plan lapses, delivery stops altogether and messages are captured again, the way they are on Free. Nothing is deleted, and putting any of the three back turns sending on again.

The sending rules do not change with your own domain. Transactional mail only, on the shared address and on yours. See What emails can your app send.

How to set up your own sending domain

  1. Open Settings > Project > Email on your Cloud project and find Sending domains.
  2. Press Add domain and type the domain you want to send from. We recommend a subdomain such as send.yourdomain.com rather than your bare domain - it keeps your main domain's reputation separate from your app's mail.
  3. Add the DNS records Playcode shows you. The next section covers the three cases.
  4. Wait. Playcode checks for the records by itself - usually minutes, sometimes a few hours. Check now forces a check if you do not want to wait.
  5. When the domain reads Verified, turn on Send to anyone if you need it.

If the domain is managed in Playcode

There is nothing to paste. When the domain's DNS is hosted by Playcode in the same workspace as the project - which is what you get when you buy a domain inside Playcode - the records are written for you at the moment you add the domain. The pane says so, and you go straight to waiting for the check. See Buy a domain.

If your DNS runs on Cloudflare

Playcode offers to add the records for you. Paste a Cloudflare DNS-edit API token and it writes them in one go. The token is used once and is never stored. You can also add the records by hand instead - the pane shows both options.

Any other DNS provider

The pane lists the exact records to add, each one with its own copy button for the name, the value, and the MX priority, plus a Copy all records button. Playcode detects who runs your DNS and formats the record names the way that provider's form expects them, so you can paste them as shown.

One record is conditional. If your domain already publishes a DMARC policy, Playcode drops its own DMARC record from the list and tells you to keep yours - two DMARC records at one name cancel each other out.

If verification does not finish

A domain that never verifies ends up as Failed. Check the records against the list in the pane, then remove the domain and add it again to start a fresh attempt. Add the records soon after you add the domain rather than weeks later.

A domain that verified once and later loses its records goes to Rechecking first, and Playcode emails the project owner with the records to put back. If they return, the domain recovers on its own and sending resumes. Removing your only verified domain turns Send to anyone off.

Mail to an address that is not verified yet

Before you have a verified domain, your app can deliver to your team and to outside addresses that confirmed they want mail from your project. Anything sent to another address is held. Held means stored and waiting - not bounced, not deleted, and not silently dropped.

Playcode emails the project owner when the first message to a new address is held, so you learn about it without watching a screen. The held messages appear in Settings > Project > Email with a Deliver action next to the address. Once that address is verified - or once Send to anyone is live on your own verified domain - you press Deliver and the held mail goes out. It is the same message, with the same links.

Who counts as verified, how many outside addresses a project can verify, and what pauses sending are covered in What emails can your app send.

Common questions

Where do notifications from my app go by default?

To your account email - the address you signed up with. Your app does not have to know it: a message sent with no recipient is addressed to the project owner by Playcode. Add another inbox in Settings > Project > Email if you want it somewhere else, and verify it first.

Do I need a domain to send email at all?

No. The shared Playcode address works with no domain and no DNS. You need your own domain when you want your brand on the message, or when you need to reach people who never confirmed an address with you.

Can people reply to my app's email?

Yes, when the message carries a reply address. Playcode uses the reply-to your app sets, or else the address in your app's own From line, and the reply lands in that inbox. If your app sets neither, the reply goes to the shared Playcode address, which is not a mailbox you can read - so set one on the messages that expect an answer.

Does this replace a newsletter tool?

No. Playcode Email is for transactional mail - the messages your app has to send for it to work. Campaigns and newsletters belong in a dedicated email marketing service. The reasons are in What emails can your app send.

Need help?

If a domain will not verify, or you are not sure which setup your app needs, ask us through the chat button in the bottom right corner of any page.

Need more help?

Can't find what you're looking for? Chat with us or send us an email.