/mailer-providers
Use when sending Webiny's email through Resend, SendGrid or Amazon SES instead of SMTP, when choosing a mail provider, or when writing a custom mail transport. Triggers on: "use Resend", "use SendGrid", "use SES", "Amazon SES", "replace SMTP", "mail provider", "custom
Claude Code
$ npx -y skills add webiny/webiny-js --skill mailer-providers --agent claude-code
Codex
$ npx skills add webiny/webiny-js --skill mailer-providers -a codex -y
Cursor
$ npx skills add webiny/webiny-js --skill mailer-providers -a cursor -y
Gemini CLI
$ npx skills add webiny/webiny-js --skill mailer-providers -a gemini-cli -y
GitHub Copilot
$ npx skills add webiny/webiny-js --skill mailer-providers -a github-copilot -y
OpenCode
$ npx skills add webiny/webiny-js --skill mailer-providers -a opencode -y
Windsurf
$ npx skills add webiny/webiny-js --skill mailer-providers -a windsurf -y
SKILL.md
mailer-providers.SKILL.mdname: webiny-mailer-providers
description: >
Use when sending Webiny's email through Resend, SendGrid or Amazon SES instead of SMTP, when
choosing a mail provider, or when writing a custom mail transport. Triggers on: "use Resend",
"use SendGrid", "use SES", "Amazon SES", "replace SMTP", "mail provider", "custom transport",
"ResendMailer", "SendGridMailer", "SesMailer", "MailTransportFactory".
Mail providers: Resend, SendGrid, Amazon SES
TL;DR
Webiny sends its mail (password reset codes, workflow notifications, the test email) through one mail transport. New projects render `<Api.Mailer.Smtp />` in `webiny.config.tsx`. Resend, SendGrid and Amazon SES are extensions: install one with the CLI, then remove `<Api.Mailer.Smtp />`. Each is configured with environment variables that the API reads when it sends mail, so API keys never go into the build.
| Provider | Install | Component | | ---------- | --------------------------------------- | --------------------- | | SMTP | in the project template | `<Api.Mailer.Smtp />` | | Resend | `yarn webiny extension mailer/resend` | `<ResendMailer />` | | SendGrid | `yarn webiny extension mailer/sendgrid` | `<SendGridMailer />` | | Amazon SES | `yarn webiny extension mailer/ses` | `<SesMailer />` |
Installing copies the source into `extensions/mailer/<provider>/` and adds the component to `webiny.config.tsx`. The code is the project's own from then on: it can be read and changed.
Replacing SMTP (`webiny.config.tsx`)
// Before
import { Api } from "webiny/extensions";
<Api.Mailer.Smtp />;
// After `yarn webiny extension mailer/resend`
import { ResendMailer } from "./extensions/mailer/resend/ResendMailer.js";
<ResendMailer />;Remove `<Api.Mailer.Smtp />` and its import yourself. If both are rendered, the provider is used while it is configured, and SMTP is the fallback.
Environment variables
Variables prefixed with `WEBINY_` are passed to the API functions on deploy, so setting them in the shell or in the project's `.env` file is enough.
Resend
| Variable | Required | Description | | ---------------------------- | -------- | ----------------------------------------------------------------------- | | `WEBINY_API_RESEND_API_KEY` | Yes | Resend API key. A key with "Sending access" is enough. | | `WEBINY_API_RESEND_FROM` | Yes | Sender, e.g. `no-reply@example.com` or `Webiny <no-reply@example.com>`. | | `WEBINY_API_RESEND_REPLY_TO` | No | Reply-to address for mail sent without one. |
The sender must be on a domain verified in Resend.
SendGrid
| Variable | Required | Description | | ------------------------------ | -------- | ----------------------------------------------------------------------- | | `WEBINY_API_SENDGRID_API_KEY` | Yes | SendGrid API key with the "Mail Send" permission. | | `WEBINY_API_SENDGRID_FROM` | Yes | Sender, e.g. `no-reply@example.com` or `Webiny <no-reply@example.com>`. | | `WEBINY_API_SENDGRID_REPLY_TO` | No | Reply-to address for mail sent without one. |
The sender must be a verified Sender Identity in SendGrid.
Amazon SES
| Variable | Required | Description | | ---------------------------------- | -------- | ----------------------------------------------------------------------- | | `WEBINY_API_SES_FROM` | Yes | Sender, e.g. `no-reply@example.com` or `Webiny <no-reply@example.com>`. | | `WEBINY_API_SES_REGION` | No | SES region. Defaults to the region the API runs in. | | `WEBINY_API_SES_REPLY_TO` | No | Reply-to address for mail sent without one. | | `WEBINY_API_SES_CONFIGURATION_SET` | No | SES configuration set, for bounce, complaint and delivery tracking. |
No credentials: on AWS, the deploy adds an `ses:SendEmail` policy for the sender to the API functions' IAM role. In a standalone project, the AWS SDK's default credential chain is used (`AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY`, a profile, an instance role). The sender must be a verified SES identity, and the account needs SES production access to mail unverified addresses.
Writing your own transport
A transport is an API extension that registers a `MailTransportFactory`. `createTransport()` reads the transport's configuration and returns a `MailTransport`, or `null` when it is not configured. The last registered factory that returns a transport is used.
// extensions/mailer/myProvider/api/MyMailTransportFactory.ts
import { MailTransport, MailTransportFactory } from "webiny/api/mailer";
class MyMailTransport implements MailTransport.Interface {
public readonly name = "Mailer/MyTransport";
async send(params: MailTransport.SendParams) {
// Call the provider. Return { result, error: null } or { result: null, error }.
return { result: null, error: null };
}
}
class MyMailTransportFactory implements MailTransportFactory.Interface {
public readonly name = "Mailer/MyTransport";
async createTransport(): MailTransportFactory.Return {
if (!process.env.WEBINY_API_MY_PROVIDER_KEY) {
return null;
}
return new MyMailTransport();
}
}
export default MailTransportFactory.createImplementation({
implementation: MyMailTransportFactory,
dependencies: []
});Register it in `webiny.config.tsx` with `<Api.Extension src={"/extensions/mailer/myProvider/api/MyMailTransportFactory.ts"} />`. The Resend, SendGrid and SES extensions are complete examples.
Settings edited in the Admin app
T
Read more
name: webiny-mailer-providers description: > Use when sending Webiny's email through Resend, SendGrid or Amazon SES instead of SMTP, when choosing a mail provider, or when writing a custom mail transport. Triggers on: "use Resend", "use SendGrid", "use SES", "Amazon SES", "replace SMTP", "mail provider", "custom transport", "ResendMailer", "SendGridMailer", "SesMailer", "MailTransportFactory".
Mail providers: Resend, SendGrid, Amazon SES
TL;DR
Webiny sends its mail (password reset codes, workflow notifications, the test email) through one mail transport. New projects render `<Api.Mailer.Smtp />` in `webiny.config.tsx`. Resend, SendGrid and Amazon SES are extensions: install one with the CLI, then remove `<Api.Mailer.Smtp />`. Each is configured with environment variables that the API reads when it sends mail, so API keys never go into the build.
| Provider | Install | Component | | ---------- | --------------------------------------- | --------------------- | | SMTP | in the project template | `<Api.Mailer.Smtp />` | | Resend | `yarn webiny extension mailer/resend` | `<ResendMailer />` | | SendGrid | `yarn webiny extension mailer/sendgrid` | `<SendGridMailer />` | | Amazon SES | `yarn webiny extension mailer/ses` | `<SesMailer />` |
Installing copies the source into `extensions/mailer/<provider>/` and adds the component to `webiny.config.tsx`. The code is the project's own from then on: it can be read and changed.
Replacing SMTP (`webiny.config.tsx`)
// Before
import { Api } from "webiny/extensions";
<Api.Mailer.Smtp />;
// After `yarn webiny extension mailer/resend`
import { ResendMailer } from "./extensions/mailer/resend/ResendMailer.js";
<ResendMailer />;Remove `<Api.Mailer.Smtp />` and its import yourself. If both are rendered, the provider is used while it is configured, and SMTP is the fallback.
Environment variables
Variables prefixed with `WEBINY_` are passed to the API functions on deploy, so setting them in the shell or in the project's `.env` file is enough.
Resend
| Variable | Required | Description | | ---------------------------- | -------- | ----------------------------------------------------------------------- | | `WEBINY_API_RESEND_API_KEY` | Yes | Resend API key. A key with "Sending access" is enough. | | `WEBINY_API_RESEND_FROM` | Yes | Sender, e.g. `no-reply@example.com` or `Webiny <no-reply@example.com>`. | | `WEBINY_API_RESEND_REPLY_TO` | No | Reply-to address for mail sent without one. |
The sender must be on a domain verified in Resend.
SendGrid
| Variable | Required | Description | | ------------------------------ | -------- | ----------------------------------------------------------------------- | | `WEBINY_API_SENDGRID_API_KEY` | Yes | SendGrid API key with the "Mail Send" permission. | | `WEBINY_API_SENDGRID_FROM` | Yes | Sender, e.g. `no-reply@example.com` or `Webiny <no-reply@example.com>`. | | `WEBINY_API_SENDGRID_REPLY_TO` | No | Reply-to address for mail sent without one. |
The sender must be a verified Sender Identity in SendGrid.
Amazon SES
| Variable | Required | Description | | ---------------------------------- | -------- | ----------------------------------------------------------------------- | | `WEBINY_API_SES_FROM` | Yes | Sender, e.g. `no-reply@example.com` or `Webiny <no-reply@example.com>`. | | `WEBINY_API_SES_REGION` | No | SES region. Defaults to the region the API runs in. | | `WEBINY_API_SES_REPLY_TO` | No | Reply-to address for mail sent without one. | | `WEBINY_API_SES_CONFIGURATION_SET` | No | SES configuration set, for bounce, complaint and delivery tracking. |
No credentials: on AWS, the deploy adds an `ses:SendEmail` policy for the sender to the API functions' IAM role. In a standalone project, the AWS SDK's default credential chain is used (`AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY`, a profile, an instance role). The sender must be a verified SES identity, and the account needs SES production access to mail unverified addresses.
Writing your own transport
A transport is an API extension that registers a `MailTransportFactory`. `createTransport()` reads the transport's configuration and returns a `MailTransport`, or `null` when it is not configured. The last registered factory that returns a transport is used.
// extensions/mailer/myProvider/api/MyMailTransportFactory.ts
import { MailTransport, MailTransportFactory } from "webiny/api/mailer";
class MyMailTransport implements MailTransport.Interface {
public readonly name = "Mailer/MyTransport";
async send(params: MailTransport.SendParams) {
// Call the provider. Return { result, error: null } or { result: null, error }.
return { result: null, error: null };
}
}
class MyMailTransportFactory implements MailTransportFactory.Interface {
public readonly name = "Mailer/MyTransport";
async createTransport(): MailTransportFactory.Return {
if (!process.env.WEBINY_API_MY_PROVIDER_KEY) {
return null;
}
return new MyMailTransport();
}
}
export default MailTransportFactory.createImplementation({
implementation: MyMailTransportFactory,
dependencies: []
});Register it in `webiny.config.tsx` with `<Api.Extension src={"/extensions/mailer/myProvider/api/MyMailTransportFactory.ts"} />`. The Resend, SendGrid and SES extensions are complete examples.
Settings edited in the Admin app
T
Open-source content platform. Self-hosted on AWS serverless. Built as a TypeScript framework you extend with code, not a closed product you configure through a UI. Runs on Lambda, DynamoDB, S3, and CloudFront inside your own AWS account. Scales automatically.
Other skills on webiny-js.
More skills from other plugins.
prompt-lookup
Activates when the user asks about AI prompts, needs prompt templates, wants to search for prompts, or mentions prompts.chat. Use…
ppt-master
AI-driven presentation workflow for generating editable PPTX decks and slides, reconstructing page visuals, creating reusable…
morph-ppt
Use this skill when the user wants a .pptx with smooth cross-slide animation — PowerPoint Morph transitions, Keynote-style…
frontend-slides
Create stunning, animation-rich HTML presentations from scratch or by converting PowerPoint files. Use when the user wants to…
Questions about mailer-providers.
- Which coding agents can use mailer-providers?
- mailer-providers installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.

