Well just create a listener that queues a new email for you. So that can be a queue job for example or a queuable mailable. This way you should be good to go.
You seem to know the right terms, so just create a queue and start sending emails ;)
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I'm creating a website that will need to send a lot of e-mails because it has a built in subscription system, so I need to send the user verification e-mail, payment confirmation, billing e-mail, and things like that so I thought about queuing them, what would be the best way?
My subscription system is using events, every time something happens I fire an event, for example: SubscriptionRenewed, SubscriptionCreated, SubscriptionCanceled. I need to send e-mails based on those events but queued so it doesn't slow the server.
Yeah so I would split every action in a separate listener. This way you might be able to reuse them. Also keeping your classes small makes them more testable and readable ;)
Please or to participate in this conversation.