Re: actionmailer / gmail / rails 2.3.2

ya, thanks, I saw that but I don't want to mess up the gems that have been installed to date so am wary of doing another install...thoughts?  It will need to suffice because the plugin route is not working:(

Re: actionmailer / gmail / rails 2.3.2 … opard#ruby

I did that for my dev machine. I can't remember how I updated my web server which is running off a Linux cluster though.

Re: actionmailer / gmail / rails 2.3.2

i'm a web developer assigned to install redmine (v. 0.8.2) on a windows 2003 server. i have it up and running using the bitnami installer. i'm running into some issues getting the emailer to work.

i've changed the email.yml and need to install the action_mailer_tls. i've tried runnig a ".script/plugin" but it doesn't find my install path. can you be more specific like what is the proper redmine root directory? mine is installed at 'c:\program files\bitnami redmine stack".


Re: actionmailer / gmail / rails 2.3.2

The syntax for email.yml:


delivery_method: :smtp
enable_starttls_auto: :true
port: 587
authentication: :plain
tls: :true
user_name: ""
password: "YOURPASS"

Re: actionmailer / gmail / rails 2.3.2

trying to do the same but all i ever see is

Loading development environment (Rails 2.3.2)
>> Notifier.deliver_hello_world
ArgumentError: wrong number of arguments (3 for 2)
    from /Users/johngriffiths/Repos/bitbucket/dates/vendor/plugins/action_mailer_optional_tls/lib/smtp_tls.rb:33:in `check_auth_args'
    from /Users/johngriffiths/Repos/bitbucket/dates/vendor/plugins/action_mailer_optional_tls/lib/smtp_tls.rb:33:in `do_tls_start'
    from /Users/johngriffiths/Repos/bitbucket/dates/vendor/plugins/action_mailer_optional_tls/lib/smtp_tls.rb:18:in `send'
    from /Users/johngriffiths/Repos/bitbucket/dates/vendor/plugins/action_mailer_optional_tls/lib/smtp_tls.rb:18:in `start'
    from /Users/johngriffiths/Repos/bitbucket/dates/vendor/plugins/action_mailer_optional_tls/lib/smtp_tls.rb:10:in `start'
    from /Users/johngriffiths/Repos/bitbucket/dates/vendor/plugins/action_mailer_optional_tls/lib/action_mailer_tls.rb:9:in `perform_delivery_smtp'
    from /Library/Ruby/Gems/1.8/gems/actionmailer-2.3.2/lib/action_mailer/base.rb:523:in `__send__'
    from /Library/Ruby/Gems/1.8/gems/actionmailer-2.3.2/lib/action_mailer/base.rb:523:in `deliver!'
    from /Library/Ruby/Gems/1.8/gems/actionmailer-2.3.2/lib/action_mailer/base.rb:395:in `method_missing'
    from (irb):1

any ideas?


require "smtp_tls"

ActionMailer::Base.raise_delivery_errors = true
ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.smtp_settings = {
  :enable_starttls_auto => true,
  :address => "",
  :port => 587,
  :domain => '',
  :authentication => :plain,
  :user_name => '',
  :password => 'password'

installed the latest gem via... … ree/master

stuck, really appreciate some pointers?

Re: actionmailer / gmail / rails 2.3.2

@Indiehead:   What is your rails version ?

Probably you can find it at … tionmailer

This setting works fine.


Re: actionmailer / gmail / rails 2.3.2

angelacode wrote:

Yep, when I look at the logs generated in the Console, it shows

Sent mail to

I believe I am on Rails 2.3.2 and Ruby 1.8.6 ...

Check to see if

config.action_mailer.raise_delivery_errors = true

in config/env/development.rb. That would effect whether you get anything in the log. I realize that you still have to get tls working, but this may help.

As for my situation, I am getting the

530 5.7.0 Must issue a STARTTLS command first. 23sm1606923pxi.5

error and I'm running 2.3.3 and Ruby 1.9.1, so the STARTTLS thing shouldn't be an issue for me from what I am hearing. I'm gonna keep playing around with it though and keep progress posted.

Cheers and good luck

Re: actionmailer / gmail / rails 2.3.2

For what it's worth, I'm using rails 2.3.4 and I got it to work with the following settings, (without any plugins). 

ActionMailer::Base.smtp_settings = {
  :enable_starttls_auto => true,
  :address => '',
  :port => 587,
  :domain => '',
  :authentication => :plain,
  :user_name => '',
  :password => 'password'

The one gotcha that hung me up a bit was adding the '' to the end of the user name.  Before I did that it was giving me:

Net::SMTPAuthenticationError: 535-5.7.1 Username and Password not accepted. Learn more at


Re: actionmailer / gmail / rails 2.3.2

:domain => '',

If I am using gmail, is the domain like

:domain => "",
"You want stimulus? How about we cut off your balls!" -- Slavoj Zizek


Re: actionmailer / gmail / rails 2.3.2

Just yesterday, sending email through rails wasn't working for me.
Now it's working perfectly fine without any changes.

For people who is still struggling with this problem,

I'd check antivirus program set up you have. My Avast Antivirus program was notifying to today, rails is doing something with smtp. I am not sure about the details. Ever since I got that message, sending email is working perfectly now.


This is the message I got from Avast.
PunBB bbcode test

Last edited by yes (2010-12-09 15:34:58)

"You want stimulus? How about we cut off your balls!" -- Slavoj Zizek

Re: actionmailer / gmail / rails 2.3.2

For what it's worth, a few gotchas that hung me up for awhile today when debugging gmail smtp TLS in my environment (I was getting the "Net::SMTPAuthenticationError: 530 5.7.0 Must issue a STARTTLS command first.")  My environment is Rails 3.0.6, Ruby 1.9.2.

- Set config.action_mailer.raise_delivery_errors = true  (Before I did this, mail just silently failed).

- When changing config settings, restart the server so they get picked up (I'm just using the default Rails server).

- If you've tried other gems (smtp_tls, action_mailer_tls, etc), uninstall them and/or move them out of the vendor/plugins area.  They were muddying the waters for me.

- enable_starttls_auto defaults to "true".  (It was "false" for me, because the afore-mentioned gems were interposing themselves, until I noticed them in the backtrace).

Bottom line, my eventual experience was that Rails 3.0.6 with Ruby 1.9.2 truly doesn't need any additional gems (though I had trouble believing it for awhile!), and it works with something very much like this in development.rb:

  config.action_mailer.raise_delivery_errors = true
  config.action_mailer.delivery_method = :smtp
  # Before Ruby 1.8.7, needed an external gem to do TLS, but no longer...
  config.action_mailer.smtp_settings = {
      # enable_starttls_auto: true, # This is enabled by default, no need to set it explicitly.
      address: "",
      port: "587",
      authentication: :plain,
      domain: "",
      user_name: "my_gmail_account_username( not necessary)",
      password: "somePassword",

Hope this helps someone.

P.S. I was eventually able to track down what was going on by sprinkling "puts" statements in the ruby-1.9.2-p180/lib/ruby/1.9.1/net/smtp.rb "do_start" method (which also required restarting the server to pick up changes).

Last edited by walquis (2011-04-17 22:19:40)

Re: actionmailer / gmail / rails 2.3.2

many thanks!! think that a lot of people will benefit from it!!  i've upgraded my application  and now satisfied with its working))