-1

This question already has an answer here:

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?

marked as duplicate by Jenny D, masegaloeh, Sven Mar 18 '15 at 15:27

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.