Apps built with AI

Your AI wrote your app's email.
Have you read it?

The welcome mail, the password reset, the receipt, and the code that decides when each one goes out. Mailway keeps an exact copy of every mail your app sends, so you can read what your customers get.

What nobody read

The app works.
The mail is wrong.

These are the kinds of mistakes that come with code nobody read line by line. None of them shows up as an error in your app, so everything looks fine. The mail is the only place they show.

Subject:Reset your password
To:customer@gmail.com
Link:http://localhost:3000/reset?token=…

The reset link opens localhost.

The agent built the link from the address the app had on your computer, and the live app still uses it. A customer clicks it and gets an error page.

Subject:Welcome to YourApp
To:customer@gmail.com
Body:Hi undefined,

Hi undefined,

The template expects a name the sign-up form never asks for. The mail goes out anyway, and its first line greets the customer as “undefined”.

09:41:02:Welcome to YourApp
09:41:09:Welcome to YourApp
09:41:15:Welcome to YourApp

One sign-up, three welcome mails.

The code that sends it runs again on a retry or a page reload. The customer gets the same mail three times in a minute.

Subject:test test please ignore
From:billing@yourapp.com
To:customer@gmail.com

A test mail reached a real customer.

A script written to try a feature ran against the real user table, not a copy of it.

What Mailway adds

Read it before your customers do.

Sandbox

Every mail, none delivered

Point your development and preview builds at smtp.mailway.dev, with the same SMTP credential. Mailway keeps every mail they send and delivers none of it unless you release one, so you read what the agent wrote before anyone else can get it. On every plan (sandbox).

Sent folder

The exact mail, after it went out

Every mail your app sends, kept exactly as sent and searchable by address: 30 days on Free, 1 year on Business, and up to unlimited with a retention add-on. Your provider's dashboard may list recent mail too. Mailway keeps it in one place, across every provider you use (try the sample).

Delivery history

An answer when a customer asks

When a customer says the mail never came, its timeline shows whether a provider accepted it and, if Mailway receives your provider's delivery events, whether it was delivered. Whether a mail reaches the inbox still depends on your sender domain and your provider.

Setup

Keep the provider
your agent picked.

Mailway is not an email provider. It sits in front of the one you already have, for example Resend, Amazon SES, or Postmark, and sends through your account with your own provider key. The provider still delivers and bills you. If you don't have a provider account yet, you need one first (provider guides).

  1. In the Mailway console, add your provider account, create a project, attach the provider to it, and create an SMTP credential. The guided setup does all four and also creates a live API key. If your app calls a provider's SDK instead of SMTP, also create a test key in the project's Access section.
  2. Put the credential, and the API keys if your app uses them, in your app's environment variables. Never paste them into the chat.
  3. Give your coding agent this prompt, in Cursor, Claude Code, Codex, Lovable, Bolt, or any other. The prompt asks it to list every mail your app sends first, point out anything that looks wrong in those mails, and change nothing until you say so.

Every step, and the Supabase Auth settings: set up with a coding agent.

Prompt for your coding agent

Move this app’s outgoing email onto Mailway. Mailway sits in front of the email provider the app already uses: it sends every mail through my own provider account and keeps an exact copy of it. Read mailway.net/llms.txt before you start.

I want three things from this change: to read every mail the app sends, to test mail without it reaching a customer, and to keep the provider I already have.

  1. List every mail first, then stop. Find every place in this codebase that sends email, and every mail another service sends for the app, such as Supabase Auth. Show them as a table: the mail, what triggers it, who receives it, its template or text, and how it’s sent today (SMTP, an SDK, an HTTP API, or another service). Under the table, point out anything that looks wrong: a link built from localhost or a development URL, a template value that can be empty, code that can send the same mail twice (on a retry, a page reload, or a double click), and test text or test addresses. If you see a reason this move won’t work for this app, say so there. Then stop, and change nothing until I tell you to go on.
  2. SMTP. If the app sends over SMTP, change only the connection settings: the host from MAILWAY_SMTP_HOST, port 587 with STARTTLS, and the username and password from MAILWAY_SMTP_USERNAME and MAILWAY_SMTP_PASSWORD. If port 587 is blocked or hangs where the app runs, use 2525, also with STARTTLS.
  3. A provider’s SDK or HTTP API, for example the Resend SDK. Replace those calls with Mailway’s send endpoint, POST {MAILWAY_API_URL}/v1/send, with the key from MAILWAY_API_KEY. Keep every field of each mail: from, to, cc, bcc, reply_to, subject, html, text, attachments, and headers. Write a from with a display name as {"email": …, "name": …}, because Mailway doesn’t accept the "Name <address>" string. Send an Idempotency-Key header of 12–40 characters (letters, digits, - and _). Build it from something unique to this one mail, such as the order ID or the reset request’s ID, so a retry of the same mail repeats the key. Never reuse a key for a later mail: Mailway keeps every key for the life of the project and answers a repeat without sending.
  4. The sandbox for development and preview builds. Production uses smtp.mailway.net, or https://api.mailway.net with a live key (mw_live_…). Development and preview builds use smtp.mailway.dev with the same SMTP credential, or https://api.mailway.dev with a test key (mw_test_…). Mailway keeps sandbox mail and sends none of it to a provider unless someone releases it in the console.
  5. Mail another service sends. Don’t change code for it. If the service lets me set custom SMTP, as Supabase Auth does, tell me where to turn it on and list the values to enter.

When you’re done, tell me:

  • which environment variables to set, with the production value and the development and preview value of each;
  • which mail from the list to trigger first in a preview build, so I can read it in the Mailway console under Mails;
  • which settings of the old provider the app no longer uses. Don’t remove them until I confirm that a real mail sent through Mailway reached my inbox.

Rules. Adapt the change to the existing code. Don’t add a standalone example. Never put a secret in the code or in a committed file, and never ask me to paste one into this chat.

Your mailer config has
one block to change

Mailway is in private beta, and we onboard teams one at a time. Leave your email and we'll send your invite when it's your turn.

read the docs meanwhile →

join the waitlist — mailway.net

Your invite, one email away.

Mailway is in private beta, and we onboard teams one at a time. Leave your email and your invite arrives when it's your turn.