Releases: BinarCode/laravel-mailator
Releases · BinarCode/laravel-mailator
4.1.1
4.1.0
Added
- Allow before constraint to setup hours:
Scheduler::init('Invoice reminder.')
->recipients($mail = '[email protected]')
->mailable(
(new InvoiceReminderMailable())->to('[email protected]')
)
->hours(1)
->before(now()->addHours(3));
The code above will send the email InvoiceReminderMailable
to [email protected]
1 hour before now + 3 hours. So basically the email will be sent in 1 hour.
4.0.0
3.11.1
3.11.0
3.10.0
Added
Events
Mailator has few events you can use.
If your mailable class extends the Binarcode\LaravelMailator\Contracts\Beforable
, you will be able to inject the before
method, that will be called right before the sending the email.
If your mailable class extends the Binarcode\LaravelMailator\Contracts\Afterable
, you will be able to inject the before
method, that will be called right after the mail has being sent.
And latest, after each mail has being sent, mailator will fire the Binarcode\LaravelMailator\Events\ScheduleMailSentEvent
event, so you can listen for it.