Is there a way to use the Laravel Event class to run code before sending each message? I would also like to cancel Mail::send(); .
Of course, I could do this before sending an email:
Event::fire('email.beforeSend');
And then I could listen like this:
Event::listen('email.beforeSend', function() {
The problem is that I have to remember to fire Event::fire() , which I would rather not do. In my case, I bounce the email address from the unsubscribe list to make sure that I do not send spam.
source share