# errors with actionmailer + gmail

**URL:** <https://discuss.rubyonrails.org/t/errors-with-actionmailer-gmail/45845>\
**Category:** rubyonrails-talk\
**Created:** [September 7, 2009, 12:56am UTC](https://discuss.rubyonrails.org/t/errors-with-actionmailer-gmail/45845 "2009-09-07T00:56:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![11175](https://avatars.discourse-cdn.com/v4/letter/1/8edcca/32.png) [@11175](https://discuss.rubyonrails.org/u/11175)\
**Post date:** [September 7, 2009, 12:56am UTC](https://discuss.rubyonrails.org/t/errors-with-actionmailer-gmail/45845/1 "2009-09-07T00:56:53Z")

</div>

trying to get a rails app to work with Gmail under ruby 1.8.6, but getting some weird errors, any help really appreciated.

Basically I installed the openrain-tls gem from here: [http://github.com/openrain/action\_mailer\_tls/tree/master](http://github.com/openrain/action_mailer_tls/tree/master)

then added my settings to : smtp\_gmail.rb

---

<div class="post-metadata">

**Author:** ![11175](https://avatars.discourse-cdn.com/v4/letter/1/8edcca/32.png) [@11175](https://discuss.rubyonrails.org/u/11175)\
**Post date:** [September 7, 2009, 11:36am UTC](https://discuss.rubyonrails.org/t/errors-with-actionmailer-gmail/45845/2 "2009-09-07T11:36:54Z")

</div>

John Griffiths wrote:

> trying to get a rails app to work with Gmail under ruby 1.8.6, but getting some weird errors, any help really appreciated.
> 
> then added my settings to : smtp\_gmail.rb
> 
> ------------- require "smtp\_tls"
> 
> ActionMailer::Base.raise\_delivery\_errors = true ActionMailer::Base.delivery\_method = :smtp ActionMailer::Base.smtp\_settings = { &nbsp;&nbsp;:enable\_starttls\_auto =\> true, &nbsp;&nbsp;:address =\> "smtp.gmail.com", &nbsp;&nbsp;:port =\> 587, &nbsp;&nbsp;:domain =\> 'mydomain.com', &nbsp;&nbsp;:authentication =\> :plain, &nbsp;&nbsp;:user\_name =\> 'email@mydomain.com', &nbsp;&nbsp;:password =\> 'password' }

> any ideas?
> 
> would really love to know where i'm going wrong, basically followed his example below to the letter, don't know where i've gone wrong.

hi John

better you switch to ruby 1.8.7 as Ruby 1.8.7 supports SMTP TLS. [https://rails.lighthouseapp.com/projects/8994/tickets/1336-starttls-for-smtp-makes-gmail-go](https://rails.lighthouseapp.com/projects/8994/tickets/1336-starttls-for-smtp-makes-gmail-go)

I will not suggess install a plugin (in 1.8.6) for something that was fixed, trialled, and used in later versions.

anyway for ruby 1.8.6 you can try this one:

> **[Shopify App to increase repeat customer purchases with customer analysis](https://projects.littlestreamsoftware.com/?version=8)**
>
> Struggling to grow your repeat purchases in Shopify? Repeat Customer Insights can equip your store with the insights it needs to increase repeat sales.

regards -Abhishek Singh

---

<div class="post-metadata">

**Author:** ![11175](https://avatars.discourse-cdn.com/v4/letter/1/8edcca/32.png) [@11175](https://discuss.rubyonrails.org/u/11175)\
**Post date:** [September 7, 2009, 6:45pm UTC](https://discuss.rubyonrails.org/t/errors-with-actionmailer-gmail/45845/3 "2009-09-07T18:45:28Z")

</div>

got it working in the end, managed to find a copy of smtp-tls in github, forked and wiki'd the how-to

[http://wiki.github.com/johnantoni/smtp-tls/how-to-for-rails-232-ruby-186](http://wiki.github.com/johnantoni/smtp-tls/how-to-for-rails-232-ruby-186)

should help anyone else in the same position, works like a dream!
