Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

isaackearl's avatar

Any tips on creating functionality for mail merge or batch email sending?

Hello!

I have an app with a user base that I occasionally have to send batch emails out to. I've created a simple email tool on my admin panel which will allow me to select users to send the email (via query)... Then it loops through and sends out an email for each one.

I'm using mailgun (mailgun driver) for all the emails being sent for my app.

What I would really like is the ability to send personalized messages in bulk... Do things like replace a variable in the message with the name of each user... and in general be very flexible with the messages I send from my admin panel.

Has anybody built anything like this and/or have any tips on a good approach?

If not then I may just end up building individual templates for each type of message I need to send, with a dynamic content section that I include from the admin panel.

Anyway, any thoughts are appreciated.

0 likes
0 replies

Please or to participate in this conversation.