Josh
Josh

Reputation: 3611

Emails sent from postfix via a Rails app are getting sent to spam in gmail

When using 'mail' command to send email to a gmail user, the email goes through fine. When sending an email using a Rails app, the email is sent to the spam folder for the gmail user. Can someone help me think through this?

Upvotes: 2

Views: 1237

Answers (3)

TenJack
TenJack

Reputation: 1632

Another thing to check is that if this is a new server, you may need to set up Domain Keys to authenticate to Gmail. This happend to me and I was able to get my mail removed from the spam folder by following these:

https://help.ubuntu.com/community/Postfix/DomainKeys

https://help.ubuntu.com/community/Postfix/DKIM

Upvotes: 0

leenasn
leenasn

Reputation: 1486

Emails landing in SPAM can happen due to many reasons:

  • Wrong Mail Server setup: Checkout here on how to setup

  • Email content: Content of the email can also invite SPAM. Sites like SpamCheck helps to check whether the content of the email is ok.

  • As mentioned by @Noli above, using services like Sendgrid, Critsend etc for sending out emails, chances of landing them in Inbox will be more. You can use them as relay servers from Postfix. But the first two steps are anyway necessary.

  • Use Mailchimp if you want to sent emails to many people, for eg: for sending out newsletters, marketing emails etc.

Upvotes: 2

noli
noli

Reputation: 15996

Mail deliverabillty is extraordinarily hard to get right. You should consider leaving this to the specialists like Sendgrid or Mailchimp, and not spend tooooo much development time thinking about it

Upvotes: 2

Related Questions