# Gmail and smtp

**URL:** <https://www.ruby-forum.com/t/gmail-and-smtp/180950>\
**Category:** Rails\
**Created:** [January 1, 2010, 7:18pm UTC](https://www.ruby-forum.com/t/gmail-and-smtp/180950 "2010-01-01T19:18:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![craigrails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/c2a13f/32.png) [@craigrails](https://www.ruby-forum.com/u/craigrails)\
**Post date:** [January 1, 2010, 7:18pm UTC](https://www.ruby-forum.com/t/gmail-and-smtp/180950/1 "2010-01-01T19:18:23Z")

</div>

hello everyone…

I’m trying to set my email up in production.

During test and development, I just used sendmail, which was stored in  
my development.rb folder at /config/environments

Everywhere online suggests that in production, the mailer stuff needs  
to be in /config/ and then into the environment.rb file

So - I have this so far,

ActionMailer::Base.smtp\_settings = {  
:address =\> “[smtp.gmail.com](http://smtp.gmail.com)”,  
:port =\> 465,  
:domain =\> “[domainname.com](http://domainname.com)”,  
:authentication =\> :login,  
:user\_name =\> “my\_user\_name”,  
:password =\> “my\_pass\_word”,  
}

Unfortunately, this results in a server error (500)

Looking in the log file at production.log, I have this:  
OpenSSL::SSL::SSLError (hostname was not match with the server  
certificate):

As i’m new to this, and this is my 1st deployment - I’m not 100% sure  
what this means.

Any help appreciated

Thanks…

–

You received this message because you are subscribed to the Google  
Groups “Ruby on Rails: Talk” group.  
To post to this group, send email to removed\_email\_address@domain.invalid.  
To unsubscribe from this group, send email to  
removed\_email\_address@domain.invalid.  
For more options, visit this group at  
[http://groups.google.com/group/rubyonrails-talk?hl=en](http://groups.google.com/group/rubyonrails-talk?hl=en).
