# Can't send emails with rails

**URL:** <https://www.ruby-forum.com/t/cant-send-emails-with-rails/125473>\
**Category:** Ruby\
**Created:** [January 9, 2008, 1:05pm UTC](https://www.ruby-forum.com/t/cant-send-emails-with-rails/125473 "2008-01-09T13:05:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rabarama](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/839c29/32.png) [@rabarama](https://www.ruby-forum.com/u/rabarama)\
**Post date:** [January 9, 2008, 1:05pm UTC](https://www.ruby-forum.com/t/cant-send-emails-with-rails/125473/1 "2008-01-09T13:05:45Z")

</div>

Hi i’m traing to send an email.  
My pages seems to work correctly but i receive nothing.

Here is my enviroment.rb configuration for actionmailer

config.action\_mailer.delivery\_method = :SMTP  
config.action\_mailer.smtp\_settings = {  
:address =\> “[smtp.MYDOMAIN.COM](http://smtp.MYDOMAIN.COM)”,  
:domain =\> “[MYDOMAIN.COM](http://MYDOMAIN.COM)”,  
:authentication =\> :login,  
:user\_name =\>“my login to smtp server”,  
:password =\>“my password”  
}  
config.action\_mailer.perform\_deliveries = true  
config.action\_mailer.raise\_delivery\_errors = true

Log show this:

Sent mail:  
Date: Wed, 9 Jan 2008 12:57:16 +0100  
From: THE RIGHT ADDRESS  
To: THE RIGHT ADDRESS  
Subject: mail di prova  
Mime-Version: 1.0  
Content-Type: text/plain; charset=utf-8

(obviously i masked with capital letters the real addresses)

Im working on a pc with an outlook with the same account configuration  
and  
it works fine

Is there something wrong?  
Why do i not receive anything?

thanks for help to a new rails user.

---

<div class="post-metadata">

**Author:** ![rabarama](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/839c29/32.png) [@rabarama](https://www.ruby-forum.com/u/rabarama)\
**Post date:** [January 9, 2008, 2:15pm UTC](https://www.ruby-forum.com/t/cant-send-emails-with-rails/125473/2 "2008-01-09T14:15:31Z")

</div>

Hi rabarama, I guess you should ask this on a Rails-only mailing list,  
but here’s my working config file, on Rails 2:

ActionMailer::Base.smtp\_settings = {  
:address =\> “[mail.domain.com](http://mail.domain.com)”,  
:port =\> 25,  
:domain =\> “[domain.com](http://domain.com)”,  
:authentication =\> :login,  
:user\_name =\> “removed\_email\_address@domain.invalid”,  
:password =\> “mypassword”,  
}

ActionMailer::Base.perform\_deliveries = true  
ActionMailer::Base.raise\_delivery\_errors = true  
ActionMailer::Base.default\_content\_type = “text/html”  
ActionMailer::Base.default\_charset = “UTF-8”

2008/1/9, rabarama [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

---

<div class="post-metadata">

**Author:** ![rabarama](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/839c29/32.png) [@rabarama](https://www.ruby-forum.com/u/rabarama)\
**Post date:** [January 9, 2008, 3:10pm UTC](https://www.ruby-forum.com/t/cant-send-emails-with-rails/125473/3 "2008-01-09T15:10:37Z")

</div>

> ActionMailer::Base.raise\_delivery\_errors = true  
> ActionMailer::Base.default\_content\_type = “text/html”  
> ActionMailer::Base.default\_charset = “UTF-8”
> 
> 2008/1/9, rabarama [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):
> 
> > Hi i’m traing to send an email.

I love you 😉

Now it works!

can you suggest me a rails only mailinglist?

---

<div class="post-metadata">

**Author:** ![rabarama](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/839c29/32.png) [@rabarama](https://www.ruby-forum.com/u/rabarama)\
**Post date:** [February 15, 2008, 11:28pm UTC](https://www.ruby-forum.com/t/cant-send-emails-with-rails/125473/4 "2008-02-15T23:28:54Z")

</div>

On Wed, 09 Jan 2008 23:15:02 +0900, Junkone wrote:

> > can you suggest me a rails only mailinglist?- Hide quoted text -
> > 
> > - Show quoted text -
> 
> you can either the rails google group or [nabble.com](http://nabble.com)

[http://dir.gmane.org/gmane.comp.lang.ruby.rails](http://dir.gmane.org/gmane.comp.lang.ruby.rails)

you’ll need an NNTP client such as Pan, or, for Windows, I think Forte.  
More convenient than google groups or nabble, particularly if you  
subscribe to more than two mailing lists 🙂

Will that action mailer work with gmail?

thanks,

Thufir

---

<div class="post-metadata">

**Author:** ![rabarama](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/839c29/32.png) [@rabarama](https://www.ruby-forum.com/u/rabarama)\
**Post date:** [January 9, 2008, 3:15pm UTC](https://www.ruby-forum.com/t/cant-send-emails-with-rails/125473/5 "2008-01-09T15:15:56Z")

</div>

On Jan 9, 9:07 am, “rabarama” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> > ActionMailer::Base.raise\_delivery\_errors = true  
> > can you suggest me a rails only mailinglist?- Hide quoted text -
> 
> - Show quoted text -

you can either the rails google group or [nabble.com](http://nabble.com)
