Closed Bouhnosaure closed 4 years ago
Thanks for raising the issue, I've never used queue's. I'd be happy to accept a PR if you managed to find a workaround.
Hi !
For the moment I've not found yet a solution, i'll take a look later as this is a needed feature in my system.
I'll try to either get the content of the mail as text only or maybe parse the html produced by the email and convert it to markdown because saving the entire content of the mail will increase the size of the database quickly
You can close the issue for now if you want i just wanted to share my experience,
I'll reopen it when i'll have to work on it and get a solution !
thanks, I appreciate that.
Hi,
I've spent 4 hours debugging because, i had an issue with a behavior of this library !
Long story short, i you use a queue system to send notifications, you might want to consider encoding your email to utf8 or try to remove as much as possible characters that can cause a json_encode to crash.
On my side, i was sending a job in order to send a notification with a model in payload ( my jobs a chained, that's why i don't use directly the notification system, it has worked for 6 months without issue ).
But the issue is that when my job was fired, it will enqueue the notification and because the listener ( to catch mail ) has to lisent to the MessageSending event, it will be enqueued as well, so a the moment when all the queue is processed, i had this weird error telling me that the payload cannot be encoded so i've struggled a long moment before giving up and at this precise moment i've tried to dump and dd everywhere in the
vendor/laravel/framework/src/Illuminate/Queue/Queue.php
file and by chance the dump had print before the error was throw and i got this :But those characters weren't the problem, it's the ones in the bottom :
So for me i'll roll my own mailcatcher i think but i hope my issue can help someone later :)
Thanks !