This course is still being released! Check back later for more chapters.
Mailer and Webhook with Mailtrap
Master sending and tracking stylish emails in Symfony & Mailtrap.
- intermediate
- 270 students
- EN/ES Captions
- EN/ES Script
- Certificate of Completion
Your Guides
About this course
Yes, sooner or later, you'll need to send emails from your app! Maybe it's a Thanks for signing up! email, Your order is ready! email, or even a We think you're fabulous, here's a discount! email. Whatever the case, with Symfony's Mailer component and Mailtrap, sending emails can be both fun in development and simple & reliable on production. In this tutorial, we'll supercharge your emails by mastering Symfony's Mailer + testing and going to production with Mailtrap:
- Installing & configuring Symfony Mailer.
- Previewing sent emails easily with the Symfony profiler and Mailtrap's Test Tool.
- Using Twig to add HTML to your emails.
- Including and inlining CSS styles in your emails.
- Integrating the Foundation CSS framework with Inky.
- Adding attachments, embedded images, and setting a global "from" address.
- Tags and metadata for tracking and organizing your emails.
- Adding email assertions to your functional tests.
- Async email sending to keep responses speedy.
- Setting up production delivery with Mailtrap's bridge.
- Send emails from the command line.
And then... we'll dive into email tracking and webhooks!
- Configuring Symfony Webhook to capture every open, click, and bounce.
- Setting up Mailtrap's routing, parsing, and event consumer.
- Testing your webhook setup locally with Mailtrap and ngrok.
So, let's get those emails flying, looking great, and tracking like a charm.
Next courses in the Symfony 7: Learn More Tricks section of the Symfony 7 Track!
11 Comments
A good course with a subject that can become quite difficult in terms of compatibility.
But Foundation in 2025 😱
Hey @Ruslan
Nice try =) You know writing some clients is a pretty complex task, and it will not fit in any course. I bet there are libraries and that is not required to do by yourself. However, we register your idea in the backlog =)
Cheers!
I mean not "full" client, may be console command for some tasks like:
- Connect by IMAP
- Check IMAP folder
- Find email by part of header , get sender, connect to specific folder (spam, inbox, ..)
- Delete email or something else.
It's helpful task for mailing - FBL (Feed Back Loops) control email.
BR.
Hey @David-B,
I don't think it will include this. symfony/mailer
is for transactional emails only which don't require an unsubscribe link.


It would be great if you could include how to create dynamic transports aside from the one configured in the configuration. I think this helps with developers who are creating SaaS applications that need to set the transports for the mail service dynamically.
Thank you.
I waiting for something like this course.