# Problem after switching to production mode

**URL:** <https://www.ruby-forum.com/t/problem-after-switching-to-production-mode/77904>\
**Category:** Radiant CMS\
**Created:** [December 1, 2006, 1:25pm UTC](https://www.ruby-forum.com/t/problem-after-switching-to-production-mode/77904 "2006-12-01T13:25:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![john-anes](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/22d042/32.png) [@john-anes](https://www.ruby-forum.com/u/john-anes)\
**Post date:** [December 1, 2006, 1:25pm UTC](https://www.ruby-forum.com/t/problem-after-switching-to-production-mode/77904/1 "2006-12-01T13:25:45Z")

</div>

Hi guys,  
On development mode the contact-us form worked fine on radiant after  
switching to production mode i get an error message like this…

“Error encountered while trying to send email. 554-xx.xx.xx.xx has not  
been authenticated to relay mail 554 Connect to your mailbox before  
sending mail via this relay”

note:  
i have changed the ip to xx

any suggestion…

regards  
john aneston

---

<div class="post-metadata">

**Author:** ![john-anes](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/22d042/32.png) [@john-anes](https://www.ruby-forum.com/u/john-anes)\
**Post date:** [December 1, 2006, 2:48pm UTC](https://www.ruby-forum.com/t/problem-after-switching-to-production-mode/77904/2 "2006-12-01T14:48:43Z")

</div>

Sean C. wrote:

> Make sure you have the same ActionMailer settings in your  
> config/environments/production.rb as in  
> config/environments/development.rb.  
> They should look something like this:
> 
> ActionMailer::Base.delivery\_method = :smtp  
> ActionMailer::Base.server\_settings = {  
> :address =\> “[yoursmtpserver.com](http://yoursmtpserver.com)”,  
> :user\_name =\> “yourlogin”,  
> :password =\> “yourpassword”,  
> :authentication =\> :plain }
> 
> The error that you got seems to imply to me that you need to provide  
> login  
> credentials to your SMTP server, so make sure that the :user\_name,  
> :password, and :authentication properties are set correctly. The  
> :authentication property can have values of :plain, :login, :cram\_md5.
> 
> Cheers,  
> Sean C.  
> [seancribbs.com](http://seancribbs.com)

Thanks Sean C.,

as you mentioned, i did not configure the production.rb file there was  
the problem, it checked for the authentication which was not found  
there… Now it works fine thanks for the timely help…

regards  
john aneston

---

<div class="post-metadata">

**Author:** ![john-anes](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/22d042/32.png) [@john-anes](https://www.ruby-forum.com/u/john-anes)\
**Post date:** [December 1, 2006, 2:19pm UTC](https://www.ruby-forum.com/t/problem-after-switching-to-production-mode/77904/3 "2006-12-01T14:19:50Z")

</div>

Make sure you have the same ActionMailer settings in your  
config/environments/production.rb as in  
config/environments/development.rb.  
They should look something like this:

ActionMailer::Base.delivery\_method = :smtp  
ActionMailer::Base.server\_settings = {  
:address =\> “[yoursmtpserver.com](http://yoursmtpserver.com)”,  
:user\_name =\> “yourlogin”,  
:password =\> “yourpassword”,  
:authentication =\> :plain }

The error that you got seems to imply to me that you need to provide  
login  
credentials to your SMTP server, so make sure that the :user\_name,  
:password, and :authentication properties are set correctly. The  
:authentication property can have values of :plain, :login, :cram\_md5.

Cheers,  
Sean C.  
[seancribbs.com](http://seancribbs.com)
