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
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 = {
:enable_starttls_auto => true,
:address => "smtp.gmail.com",
:port => 587,
:domain => ''mydomain.com'',
:authentication => :plain,
:user_name =>
''email-3Q2Tfjf0mexWk0Htik3J/w@public.gmane.org'',
:password => ''password''
}
tried it out in script/console and got:
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?
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.
http://github.com/openrain/action_mailer_tls/tree/master
?
--
Posted via http://www.ruby-forum.com/.
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 = { > :enable_starttls_auto => true, > :address => "smtp.gmail.com", > :port => 587, > :domain => ''mydomain.com'', > :authentication => :plain, > :user_name => ''email-3Q2Tfjf0mexWk0Htik3J/w@public.gmane.org'', > :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 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: https://projects.littlestreamsoftware.com/projects/83/wiki/Actionmailer?version=8 regards -Abhishek Singh -- Posted via http://www.ruby-forum.com/.
thanks for the post, if i could upgrade the box to 1.8.7 i surely would. i''ll try out that link and see how it goes, appreciate it. -- Posted via http://www.ruby-forum.com/.
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 should help anyone else in the same position, works like a dream! -- Posted via http://www.ruby-forum.com/.