You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, this isn't really a bug, it's user error on my part, but I found the developer experience of hunting down the issue to be quite painful.
The situation is, I have several installations of my Laravel app, and basically all of them use Mailgun for email sending. I set up a new server and for whatever reason the client wanted to use SMTP or sendmail. No problem I thought, let me just change the MAIL_DRIVER and other .env variables accordingly and it should be sorted, I love Laravel!
So, off I go, everything looks to be working just fine as queued emails show up as successfully completed in Laravel horizon and I get no errors anywhere (including logs etc).
Fast forward 2 weeks and I get an angry email from the customer saying they aren't getting scheduled emails. I proceed to tear my hair out and change .env values all day, going from one stackoverflow post to the next laracasts post, and nothing works. Everything I try appears to send the email just fine, except it definitely doesn't.
Then I take a closer look and realise my problem. I was setting MAIL_DRIVER, not MAIL_MAILER as it was renamed in L7. Quick change and everything worked as expected.
I know, I know, this was all user error. I should have known about that MAIL_MAILER change, and indeed I even updated my config file to use the new name when upgrading to L7 (although I did set the default to mailgun, not smtp). The problem is nowhere was i thrown any lifelines or were there any errors thrown, or was there any indication at all that something wasn't right.
Would there be some way of alerting an idiot like myself to the fact that emails are actually not being sent if these configs are completely wrong?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi guys,
First of all, this isn't really a bug, it's user error on my part, but I found the developer experience of hunting down the issue to be quite painful.
The situation is, I have several installations of my Laravel app, and basically all of them use Mailgun for email sending. I set up a new server and for whatever reason the client wanted to use SMTP or sendmail. No problem I thought, let me just change the MAIL_DRIVER and other .env variables accordingly and it should be sorted, I love Laravel!
So, off I go, everything looks to be working just fine as queued emails show up as successfully completed in Laravel horizon and I get no errors anywhere (including logs etc).
Fast forward 2 weeks and I get an angry email from the customer saying they aren't getting scheduled emails. I proceed to tear my hair out and change .env values all day, going from one stackoverflow post to the next laracasts post, and nothing works. Everything I try appears to send the email just fine, except it definitely doesn't.
Then I take a closer look and realise my problem. I was setting MAIL_DRIVER, not MAIL_MAILER as it was renamed in L7. Quick change and everything worked as expected.
I know, I know, this was all user error. I should have known about that MAIL_MAILER change, and indeed I even updated my config file to use the new name when upgrading to L7 (although I did set the default to mailgun, not smtp). The problem is nowhere was i thrown any lifelines or were there any errors thrown, or was there any indication at all that something wasn't right.
Would there be some way of alerting an idiot like myself to the fact that emails are actually not being sent if these configs are completely wrong?
Beta Was this translation helpful? Give feedback.
All reactions