Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel Mailable not updating with code

Tags:

php

laravel

I have a Mailable in Laravel 5.3 App\Mail\CustomerCreated. It was all working fine.

We needed to change the sender email so, I edited the from, and we needed to add 2 attachments to the 2 already there. I did it. No change in the mail.

I changed the blade, and it correctly sent the new data, but still wrong sender and wrong attachments.

I tried artisan commands: php artisan clear-compiled php artisan cache:clear php artisan config:clear

Then I even commented out all the code in the build() of the mailable... and the mail still sent.

like image 313
TDawg Avatar asked Feb 06 '17 07:02

TDawg


2 Answers

Got the same problem. If you change queue for send it will work properly, but the actual fix is:

php artisan queue:restart
like image 128
Lucas Serafim Avatar answered Sep 22 '22 09:09

Lucas Serafim


Guess it wasn't mail after all...

I was sending via database queue, and as long as there was a similar row in queue it kept resending old one. When I restarted queue it all worked as normal.

like image 25
TDawg Avatar answered Sep 21 '22 09:09

TDawg