laravel application that uses gmail smtp all email goes to spam

I have an email called [email protected], I created it using G Suite and I use it on my .env file

MAIL_DRIVER=smtp MAIL_HOST=smtp.gmail.com MAIL_PORT=587 [email protected] MAIL_PASSWORD="" MAIL_ENCRYPTION=tls

I have set txt record with value v=spf1 mx -all
I have MX record with mail server 'mydomain.com'

any ideas please?

1 Reply

The recommended spf record for G Suite is:

v=spf1 include:_spf.google.com ~all

Source: https://support.google.com/a/answer/33786?hl=en

If you have set the MX record for mydomain.com to mydomain.com, but are using gmail, spf fails and mail is likely to end up in spam if not silently deleted. This is especially true when using -all instead of ~all.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct