Prerequisites
To get the most out of this guide, you will need to:1. Install
Get the Resend Mailer Bridge package.Composer
Composer
2. Configuring Mailer
In your.env.local
file, which you can create if needed, add the following:
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 theMailer
:
$this->mailer
to send your email:
4. Receive and handle webhooks
Thanks to the Webhook Component, you can create a webhook listener.src/Webhook/ResendWebhookListener.php
config/packages/webhook.yaml
https://{app_domain}/webhook/mailer_resend
) in the Resend Dashboard:
5. Try it yourself
Symfony Example
See the full source code.