# ?using sendmail for actionmailer marks my emails as spam

**URL:** <https://www.ruby-forum.com/t/using-sendmail-for-actionmailer-marks-my-emails-as-spam/77054>\
**Category:** Rails\
**Created:** [November 23, 2006, 7:29pm UTC](https://www.ruby-forum.com/t/using-sendmail-for-actionmailer-marks-my-emails-as-spam/77054 "2006-11-23T19:29:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Heri\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/58956e/32.png) [@Heri\_R](https://www.ruby-forum.com/u/Heri_R)\
**Post date:** [November 23, 2006, 7:29pm UTC](https://www.ruby-forum.com/t/using-sendmail-for-actionmailer-marks-my-emails-as-spam/77054/1 "2006-11-23T19:29:41Z")

</div>

hi list  
i am trying to understand how sendmail works, instead of using an  
outgoing  
mail server. it works for gmail and [live.com](http://live.com) but doesnt for yahoo or  
hotmail  
for example. they dont even get to the spam folder.

i am complete beginner for email. what should i do to flag outgoing  
emails  
as proper email by using sendmail

thanks

–  
Heri R.  
[http://sprinj.com](http://sprinj.com)

---

<div class="post-metadata">

**Author:** ![Heri\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/58956e/32.png) [@Heri\_R](https://www.ruby-forum.com/u/Heri_R)\
**Post date:** [November 23, 2006, 8:09pm UTC](https://www.ruby-forum.com/t/using-sendmail-for-actionmailer-marks-my-emails-as-spam/77054/2 "2006-11-23T20:09:47Z")

</div>

Make sure you are sending from an email address that is from the domain  
your  
rails app is on.

Services like hotmail use SPF (Sender Policy Framework) DNS Records  
[http://www.openspf.org](http://www.openspf.org)

And if the email isn’t from that domain it gets rejected

make sure the subject and body contain real info on the site and purpose  
ie something like

Foo.bar welcomes you to their newsletter!!

This will help it to not go into junk folders

* * *

From: removed\_email\_address@domain.invalid  
[[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)] On Behalf Of Heri R\>  
Sent: Thursday, November 23, 2006 10:27 AM  
To: rubyonrails-talk  
Subject: [Rails] ?using sendmail for actionmailer marks my emails as  
spam

hi list  
i am trying to understand how sendmail works, instead of using an  
outgoing  
mail server. it works for gmail and [live.com](http://live.com) but doesnt for yahoo or  
hotmail  
for example. they dont even get to the spam folder.

i am complete beginner for email. what should i do to flag outgoing  
emails  
as proper email by using sendmail

thanks

–  
Heri R.  
[http://sprinj.com](http://sprinj.com)

---

<div class="post-metadata">

**Author:** ![Heri\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/58956e/32.png) [@Heri\_R](https://www.ruby-forum.com/u/Heri_R)\
**Post date:** [November 23, 2006, 10:10pm UTC](https://www.ruby-forum.com/t/using-sendmail-for-actionmailer-marks-my-emails-as-spam/77054/3 "2006-11-23T22:10:00Z")

</div>

I didn’t read the rest of the thread, but I got that when this line was  
munged:

ActionMailer::Base.server\_settings = {  
:address =\> “[myMailbox.com](http://myMailbox.com)”,  
:port =\> 25,  
:domain =\> ‘[myOwnRealDomain.com](http://myOwnRealDomain.com)’, # ← must be correct  
:user\_name =\> “whatever”,  
:password =\> ‘\*\*\*\*’,  
:authentication =\> :login  
}

## The simplest check for spam compares the outbound domain in the mail headers to the actual host the mail came from. If they differ, then either a spammer has penetrated a computer and is using it to mask their real domain name

or a Rails newb is on the loose! 😉

–  
Phlip  
[Redirecting...](http://www.greencheese.us/ZeekLand) ← NOT a blog!!!
