I have implemented QueueTransport to automatically enqueue emails, and SendMailJob to process those emails.
Config options are:
options: Options array to be passed to push method. It allows to keep emails on a different queue or with different params.
transport: Transport class name, to be initialized into SendMailJob. Defaults to MailTransport as CakePHP does.
Initially I thought it would be a good idea config to be:
But to make it as simple as possible, using the existing config and just switching the className to QueueTransport and adding the actual transport is better.
Please let me know your thoughts and if everybody is ok with this change I will implement the unit tests.
Fixes #64
I have implemented
QueueTransport
to automatically enqueue emails, andSendMailJob
to process those emails.Config options are:
options
: Options array to be passed topush
method. It allows to keep emails on a different queue or with different params.transport
: Transport class name, to be initialized intoSendMailJob
. Defaults toMailTransport
as CakePHP does.Initially I thought it would be a good idea config to be:
But to make it as simple as possible, using the existing
config
and just switching theclassName
toQueueTransport
and adding the actualtransport
is better.Please let me know your thoughts and if everybody is ok with this change I will implement the unit tests.
Thank you!