Laravel emails show as spam Hi all,
I've just set up a Laravel application in production that uses supervised queues to handle emails. But received emails are highlighted as possible spam, in Gmail at least.
Could it be a problem that MAIL_FROM_ADDRESS in the .env is different from the email data I set for the MAIL_USERNAME?
Would you please be kind to help troubleshoot this issue please?
Thank you!
are you using any email service (like mailgun)?
@Akash_kit , no I don't. I use the company's email from 1&1.
@tudosm my first bet is that it's due to spf. Can you share the domain?
@Sinnbeck , I get 7/10. Failing for "You're not fully authenticated"
Your message is not signed with DKIM
[SPF] smarteducationpro.co.uk does not allow your server 212.227.126.133 to use [email protected]
And it also says I was put in two blacklists
Listed in SORBS (last 28 days) ( -0.5 )
@tudosm
SPF prevents spammers from sending unauthorized messages that appear to be from your domain.
Receiving servers use DKIM to verify that the domain owner actually sent the message. Important: Gmail requires a DKIM key of 1024 bits or longer.
You need both of them to be Authorised. if you don't want your mails to go in to spam.
@tudosm yeah you need to get this properly set up. I use mailgun myself, and they help set up everything :)
Can you show your env config (hide passwords)
@Sinnbeck , sure
MAIL_MAILER=smtp
MAIL_HOST=smtp.ionos.co.uk
MAIL_PORT=587
MAIL_USERNAME="f2b37f087bbf5c-dsa2123sa"
MAIL_PASSWORD=
MAIL_ENCRYPTION=tls
[email protected]
MAIL_FROM_NAME="${APP_NAME}"
@tudosm It's batter to use any email service because some domains are not SPF or the DKIM authenticated. because of that your mail goes into spam.
@Akash_kit do you mean to use a mailgun service instead?
@tudosm Yes, there are many emails services with free plans. So you can choose other if you want like
sendinblue , mailchimp and many more.
Please sign in or create an account to participate in this conversation.