# User Activation Email won't send on test server

**URL:** <https://www.ruby-forum.com/t/user-activation-email-wont-send-on-test-server/157715>\
**Category:** Rails\
**Created:** [January 14, 2009, 6:37pm UTC](https://www.ruby-forum.com/t/user-activation-email-wont-send-on-test-server/157715 "2009-01-14T18:37:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sean\_CSHess](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/94ad74/32.png) [@Sean\_CSHess](https://www.ruby-forum.com/u/Sean_CSHess)\
**Post date:** [January 14, 2009, 6:37pm UTC](https://www.ruby-forum.com/t/user-activation-email-wont-send-on-test-server/157715/1 "2009-01-14T18:37:45Z")

</div>

I’m not sure what I’m doing wrong, but the email sends fine from my  
local computer. The test server log says that the email was sent, but  
it never arrives. I don’t get any errors (not in the log anyway).

I’m using gmail as my smtp server per the following instructions.  
[http://scottmotte.com/archives/297](http://scottmotte.com/archives/297)

Any ideas?

Thanks  
~sean

---

<div class="post-metadata">

**Author:** ![Sean\_CSHess](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/94ad74/32.png) [@Sean\_CSHess](https://www.ruby-forum.com/u/Sean_CSHess)\
**Post date:** [January 14, 2009, 6:44pm UTC](https://www.ruby-forum.com/t/user-activation-email-wont-send-on-test-server/157715/2 "2009-01-14T18:44:12Z")

</div>

This is my ActionMailer Setup in environment.rb

require ‘smtp\_tls’

ActionMailer::Base.raise\_delivery\_errors = true  
ActionMailer::Base.perform\_deliveries = true  
ActionMailer::Base.delivery\_method = :smtp

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

note this setup:  
:domain =\> “[mydomain.com](http://mydomain.com)”,  
:user\_name =\> “removed\_email\_address@domain.invalid”,

Whit that you identify your google app, in the tutorial say @gmail.com

If you use your gmail acount, put this lines to fire the errors:  
ActionMailer::Base.raise\_delivery\_errors = true  
ActionMailer::Base.perform\_deliveries = true  
ActionMailer::Base.delivery\_method = :smtp

and use the tutorial setup.-

---

<div class="post-metadata">

**Author:** ![Sean\_CSHess](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/94ad74/32.png) [@Sean\_CSHess](https://www.ruby-forum.com/u/Sean_CSHess)\
**Post date:** [January 14, 2009, 7:17pm UTC](https://www.ruby-forum.com/t/user-activation-email-wont-send-on-test-server/157715/3 "2009-01-14T19:17:45Z")

</div>

Sweet! Your setup worked. The three lines I was missing were the  
perform\_deliveries, the delivery\_method and the domain in the  
settings.

Thanks!  
~sean

On Jan 14, 10:43 am, “Agustin Nicolas Viñao Laseras”
