Ruby on rails mailer + Mailgun marked as spam -


i have actionmailer following settings(according this guide):

require 'digest/sha2' class winnermailer < actionmailer::base   include resque::mailer   default "message-id"=>"<#{digest::sha2.hexdigest(time.now.to_i.to_s)}@my-domain.com>"   default from: "mail@my-domain.com" 

my email has:

from: mail@my-domain.com to: xxx@gmail.com message-id: <50117ee0355959752a01b1737c8568f30ea72db2f35ec68cfa7808cea18dbb69@my-domain.com> 

my production.rb has following settings:

  config.action_mailer.delivery_method = :smtp   config.action_mailer.perform_deliveries = :true #try force sending in development   config.action_mailer.raise_delivery_errors = :false   config.action_mailer.smtp_settings = {       :authentication => :plain,       :address => "smtp.mailgun.org",       :port => 587,       :domain => "my-domain.com",       :user_name => "postmaster@my-domain.com",       :password => "qqqqq"   } 

for reasons letters go spam folder. doing wrong?

there tons of different reasons, why mail might marked spam. few examples:

  • based on wording (blacklisted words, short),
  • the domain on black list,
  • the ip on blacklist,
  • the receiver once marked mail spam
  • you sent many mail in short period of time
  • you change domain or ip
  • ip not match domain name
  • number of recipients
  • ...

some spam filters add description mail header why mail marked spam , how mail scored in different spam checks. might want take lock header more information.

furthermore might need form company manages mailserver, find out if domain or ip on list of hosts known spam. people manage mailservers have access such lists , monitor list entries customers , may take actions against wrong listings.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -