cakephp / queue

A queue-interop compatible Queueing library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Using a Queue Transport instead of push method for sending emails

doshu opened this issue · comments

instead using the push method of the QueueTrait, a Queue Transport should be created.
This will allow using the standard send method of the mailer class.
This will give the ability to swapping the current method of sending emails in the application, without rewrite code.

Having a mail transport that creates queue jobs is a neat idea.

A while ago I proposed (to the original repo) a way to queue Cake events, which is more inclusive than just emails. Here's a (very old) post about it: https://someguyjeremy.com/2017/07/queued-events-in-cakephp.html

I've been using that method to queue events for a while (for emails, pdf generation, api requests, etc.) and it works really nicely and I don't have to write a lot of extra code - just a listener. Perhaps a solution like that could fit in cakephp/queue?