Judging by the number of email outsourcing companies, there is clearly a large problem to be solved. I’ve had sporadic issues with email being marked as SPAM with HomeField, and then regular issues on my latest project, FoundersCard. I’ve finally got them fairly well sorted, as far as I can tell…
- The DNS records on your name sever must be setup correctly (and verified)
- The A record of the domain you’re actually sending mail from (i.e. teamhomefield.com) must point to the IP of the actual server sending the email (in this case 8.12.42.205)
- You should also configure the SPF record which is being used increasingly by recipient mail servers to further determine if the sending servers IP address is authorized to send email for the given domain. My DNS has a TXT record with the value “v=spf1 a mx ptr ~all”.
- This wizard will help you create the proper record.
- rDNS (reverse DNS) must be setup
- On the server sending the mail, the PTR record must correctly specify the hostname pointing to this sever (teamhomefield.com)
- Your Rails setup…
- You can set from to be any username at the domain configured above, but I’ve found that GMail will mark SPAM unless the following format is used
- from ”anything@teamhomefield.com (Anything Else)”
- Not sure why “Anything Else <anything@teahomefield.com>” doesn’t work..
- The reply-to is great for sending on behalf of a user
- reply_to “Dan Spinosa <spinosa@gmail.com>”
- I am using the following ActionMailer configuration
-
config.action_mailer.sendmail_settings = { :location => '/usr/sbin/sendmail', :arguments => '-i -t' }
-
- You can set from to be any username at the domain configured above, but I’ve found that GMail will mark SPAM unless the following format is used
- Your emails content…
- If you’re sending HTML email, be sure to send it as a multipart email including a text part that closely matches the HTML (which, BTW, should include <html> and <body> tags)
- In Rails, if your mailer action is named “notify_email”, Rails will automatically create a multipart email for you if you have multiple views: notify_email.text.html.erb and notify_email.text.plain.erb
- It’s free to check your spam score & deliverability at contactology
- If you’re sending HTML email, be sure to send it as a multipart email including a text part that closely matches the HTML (which, BTW, should include <html> and <body> tags)
- Your mail servers IP…
- Make sure it is not listed by Spamhaus, and remove it if it is. It is common to see your IP in their PBL, which can easily be remedied.
HTH, and hope I don’t have to deal with this again.





