-1

I have a Bash script which is scheduled to run everyday and sends out user notification emails using a command like:

mail -s "Hello World" someone@gmail.com

Why is this email detected as spam by Gmail. Is there something I can do so that Gmail doesn't spam the email?

1 Answers1

1

It might be because Gmail is super strict about their mail policies. You should add a SPF record, something like

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

Also Gmail works with dkim

You should set this up. And also check if your blacklisted

Saeed
  • 366
  • 3
  • 11