@concourse/email sends local mail through SMTP and hosted test mail through Resend.
Development and browser tests use Maildev:
EMAIL_PROVIDER=maildev
MAILDEV_SMTP_HOST=127.0.0.1
MAILDEV_SMTP_PORT=1025Run pnpm dev for foreground Maildev. Use pnpm maildev:start and pnpm maildev:stop only when
you need the repository-owned background process.
Create a sending-only key in the existing Resend account and restrict it to mail.tredis.dev.
Store the key as a sensitive Vercel variable in Production and Preview. Configure:
EMAIL_PROVIDER=resend
AUTH_EMAIL_FROM=concourse@mail.tredis.dev
RESEND_TEST_RECIPIENT=<approved test address>The client checks every To, CC, and BCC address before it calls Resend. All addresses must match
RESEND_TEST_RECIPIENT. This keeps general user email disabled until the policy is deliberately
changed.
import Email from "@concourse/email";
const email = new Email({
provider: "resend",
apiKey: process.env.RESEND_API_KEY!,
testRecipient: process.env.RESEND_TEST_RECIPIENT!,
});
const result = await email.send({
from: "concourse@mail.tredis.dev",
to: "test@example.com",
subject: "Concourse test",
text: "The email boundary is ready.",
});Callers must handle result.error. Authentication converts that result into a generic delivery
error and never exposes provider details to the user.
@concourse/email sends local mail through SMTP and hosted test mail through Resend.
Development and browser tests use Maildev:
EMAIL_PROVIDER=maildev
MAILDEV_SMTP_HOST=127.0.0.1
MAILDEV_SMTP_PORT=1025Run pnpm dev for foreground Maildev. Use pnpm maildev:start and pnpm maildev:stop only when
you need the repository-owned background process.
Create a sending-only key in the existing Resend account and restrict it to mail.tredis.dev.
Store the key as a sensitive Vercel variable in Production and Preview. Configure:
EMAIL_PROVIDER=resend
AUTH_EMAIL_FROM=concourse@mail.tredis.dev
RESEND_TEST_RECIPIENT=<approved test address>The client checks every To, CC, and BCC address before it calls Resend. All addresses must match
RESEND_TEST_RECIPIENT. This keeps general user email disabled until the policy is deliberately
changed.
import Email from "@concourse/email";
const email = new Email({
provider: "resend",
apiKey: process.env.RESEND_API_KEY!,
testRecipient: process.env.RESEND_TEST_RECIPIENT!,
});
const result = await email.send({
from: "concourse@mail.tredis.dev",
to: "test@example.com",
subject: "Concourse test",
text: "The email boundary is ready.",
});Callers must handle result.error. Authentication converts that result into a generic delivery
error and never exposes provider details to the user.