Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6237703
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T11:04:45+00:00 2026-05-24T11:04:45+00:00

I managed to configure ActionMailer on my local machine to send emails via Gmail.

  • 0

I managed to configure ActionMailer on my local machine to send emails via Gmail. (it required tlsmail in gemfile)

### config/environment.rb
require 'tlsmail'

Ideas::Application.configure do
  config.action_mailer.raise_delivery_errors = true
  config.action_mailer.delivery_method = :smtp
  config.action_mailer.smtp_settings = {
    :address        => 'smtp.gmail.com',
    :port           => '587',
    :domain         => 'xxxx@gmail.com',
    :user_name      => 'xxxx@gmail.com', 
    :password       => 'xxxxxxx',
    :authentication => :plain
  }
end

This worked on my local machine (the emails were sent) but as usually hreoku had some problems with this (Errno::ECONNREFUSED (Connection refused – connect(2))). I googled that they have a particular solution for gmail:

http://blog.heroku.com/archives/2009/11/9/tech_sending_email_with_gmail/

They are saying I need an additional SMTP TLS library. As mentioned above I added a gem that resolved the issue but only on my local machine. Well ok, I tried their solution and it worked… on heroku, but stopped working on my local. (it doesn’t give an error, it just says the email was sent, but it never is.)

Environmental variables are set properly.

Do you have any ideas how to make at least one of this methods work both on my local machine and heroku?

Bye

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T11:04:46+00:00Added an answer on May 24, 2026 at 11:04 am

    You need to set it up in the correct environment. You’ll need to do this in your gemfile with groups

    group :development do
      gem '<development gem here>'
    
    group :production do
      gem '<production gem here>'
    

    Don’t forget to rebundle. Then move the config relevant to each environment into either config/environments/production.rb or config/environments.development.rb

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

After lots of issues, finally I managed to configure log4net for my window service.
When I move some subdirectory away from project managed by ./configure and all that
I've managed to configure the maven jetty plugin to successfully deploy a jax-ws war
I'm new to OpenTSDB. I somehow managed to install and configure OpenTSDB, but I
I've set up Rails on Ubuntu 10 under VirtualBox. I've managed to configure pretty
I'm wondering if anyone has managed to integrate SASS into their RubyMine environment, and
Im trying to configure my Ejabberd to run on Ubuntu. I have managed to
I am currently trying to configure an ASP.net Web Application through Web.config, to host
I'm working on an auto-configure app for new PC's. I managed to programatically set
I have configured two authentication providers in my Spring Security config: <security:authentication-manager> <security:authentication-provider ref=XProvider

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.