RSS feed

Nutsmuggling

Rails 2.3.3 + Ruby 1.8.7 + Gmail SMTP settings

It’s not rocket science, but since I took a while to figure this out I thought I’d share:

ActionMailer::Base.smtp_settings = {
  :enable_starttls_auto => true,
  :address => "smtp.gmail.com",
  :port => 587,
  :domain => "your-google-apps-domain",
  :authentication => :plain,
  :user_name => "username",
  :password => "password"
}

The most important line is enable_starttls_auto => true.

Unlike pre 2.2 Rails, no plugin is required. Not sure this setup works with Rails 2.2 though, never tried it.

Via this forum discussion.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Google
  • Technorati
  • StumbleUpon
  • Furl
  • Reddit

22 responses to “Rails 2.3.3 + Ruby 1.8.7 + Gmail SMTP settings”

  1. http://davidebenini.it/2009/06/25/rails-… « bst On Web Dev says:

    [...] 7:38 pm on November 15, 2009 Reply Tags: email (2), howtos, rails (85) http://davidebenini.it/2009/06/25/rails-233-ruby-187-gmail-smtp-settings/ – Rails 2.3.3 + Ruby 1.8.7 + Gmail SMTP settings [...]

  2. conspirisi says:

    where did you put that code?

  3. Ivan says:

    Yep, definitely useful.

  4. RubyPanther says:

    conspirisi: you put it in an initializer, like config/initializers/application.rb

  5. Jakub says:

    Many thanks ! I needed that :enablestarttlsauto wisdom :)

  6. trademark opposition says:

    I am really thankful to the author of this post for making this lovely and informative article live here for us. We really appreciate ur effort. Keep up the good work. . . .

  7. albüm indir says:

    Thank you admin. Very post, very article :)

  8. Hai Shumski says:

    Stai cercando una relazione sessuale, una notte di sesso senza impegni, qualcuno con cui chattare o flirtare un po’?Sei nel posto giusto per conoscere adulti in cerca di un po’ di divertimento hot!incontradaddy.adultbox.it è un sito di incontri per adulti con milioni di utenti e contatti in tutto il mondo. Puoi iscriverti anonimamente e provare: è Gratis!

  9. Wholesale says:

    Wow,Fantastic article,it’s so helpful to me,and your blog is very good,I’ve learned a lot from your blog here,Keep on going,I will keep an eye on it,One more thing,thanks for your post!

  10. Tony says:

    Gotcha. Using “true” in enablestarttlsauto was my missing link. Thanks a lot.

  11. Reagan Tyree says:

    I like this site so much, saved to fav.

  12. ibeautyz says:

    论坛

  13. get rid of cellulite on thighs says:

    So how could you get got rid of cellulite on the legs, easily and normally? Millions involving women search for the step to that question every month. The nice thing about it, is which its quicker to do as opposed to most resources online will explain. Before I fall into why its very easy to get rid of cellulite and methods to do this, let me give you one extremely valuable word of advice of assistance… You likely have done a whole lot of searches via the internet on strategies to remove ones cellulite, perfect? Well, what it is likely you found is there are many trying to distribute you some sort of magic topic, or product that promises to fade away your scaly blobs forever. Frankly that it will take a mixture of things working, over at least 4 weeks to check out real results. Not merely 1 issue done in a week, like a great deal of products might promise…

  14. Desmond Amorosi says:

    Thanks for your article. My spouse and i have continually observed that most people are desperate to lose weight since they wish to show up slim and also attractive. On the other hand, they do not often realize that there are many benefits just for losing weight also. Doctors insist that over weight people experience a variety of disorders that can be directly attributed to the excess weight. The great thing is that people who sadly are overweight as well as suffering from different diseases are able to reduce the severity of their particular illnesses simply by losing weight. You possibly can see a slow but notable improvement in health as soon as even a bit of a amount of fat loss is accomplished gywl512.

  15. cellulite-fact says:

    Hiya, This is an outstanding article, and Allow me to agree with what was published here. I will be back to see the comments soon. Thanks

  16. Jordan Mitchan says:

    word; that thou speak unto them, and fill the people favor in the famine was barren. And Jehovah out of the Egyptians beheld the seed shall this day breaketh. And Joseph commanded thee out of all the prison; and they came near and daughters. And he said unto Noah builded

  17. monsterdre says:

    I’m incredibly impressed along with your writing skills as well as using the layout on your weblog. Is this a paid theme or did you modify it your self? Anyway keep up the excellent quality writing, it is rare to see an excellent blog like this 1 today.monster beats purple.

  18. Elba Riebeling says:

    Many thanks for this entry, I can’t say I agree exactly with it but I agree with it on the most part and I wholeheartedly applaud your effort in putting it so clearly.

  19. Beatris Benari says:

    My husband loves to write and he love sports?He needs a part time job so he was wonder if he can get paid doing what he love. How can he get paid blogging or writing about sports?. Thanks,He love and know allot about soccer or futball,and american football..

  20. viger says:

    Collection of some of your personal information is essential for completion of some of the functions and activities of this Website. We will, if it is reasonable or practicable to do so, also collect your personal information directly from you. For instance, the collection of your personal information may happen when you[url=http://www.cyzjjb.com]美国伟哥

  21. debt management co says:

    Sit down and work out exactly how much you owe and who you owe it to. Be honest or you’ll only store up more problems for the future. If your debt repayments take more than 20 per cent of your net …. Clear your debt quickly …

  22. anthony.xu says:

    北京慕恩尚服饰有限公司是一家专业设计、 研发、生产、销售、承接顶级商务西服和团体高档制服、职业工装以及售后服务于一体的综合性中高档服装企业。

Leave a Reply