Skip to main content

Prerequisites

Before you start, you’ll need:

Guide

1

Install

Get the Resend Mailer Bridge package.
Composer
If your application relies on Resend webhook events, also install the Symfony Webhook Component.
Composer
2

Configuring Mailer

In your .env.local file, which you can create if needed, add the following:
Replace API_KEY with your Resend API key, and SIGNING_SECRET with your webhook secret, which can be retrieved from the Resend dashboard after creating a new webhook endpoint (see below).
3

Send your first email

In a controller, inject the Mailer:
In a controller action, use the $this->mailer to send your email:
Learn more about sending emails with Mailer Component in Symfony’s documentation.
4

Receive and handle webhooks

Thanks to the Webhook Component, you can create a webhook listener.
src/Webhook/ResendWebhookListener.php
Bind your listener to the Webhook routing config:
config/packages/webhook.yaml
Next, register your application’s webhook endpoint URL (example: https://{app_domain}/webhook/mailer_resend) in the Resend Dashboard:

Examples

Symfony App

Full Symfony web application

Basic Send

Basic, batch, and prevent-threading send

Attachments

File attachments and inline images (CID)

Scheduling

Schedule emails for future delivery

Templates

Send emails using Resend hosted templates

Double Opt-in

Double opt-in subscription flow

Inbound Webhooks

Receive and process inbound emails

Audiences

Manage contacts and audiences

Domains

Create and manage sending domains