Forum: Ruby on Rails Error Send Message

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
567514fd39d8f711ef86367179fbdb42?d=identicon&s=25 Touch Ponlork (ponlork)
on 2009-03-26 11:11
Hello,
I'm trying to make my rails app send mail. so it's can't send it's
error.

I'm using the following configuration in environment.rb:
==
Rails::Initializer.run do |config|
    ...


    config.action_mailer.delivery_method = :smtp

end
ActionMailer::Base.smtp_settings = {
  :address => "mail.mydomain",
  :port => 25,
  :domain => "mydomain",
  :authentication => :login,
  :user_name => "my username",
  :password => "my pws"
}
==
   The error bellow i check in my production.log after i send mail.
please help me.
====
Timeout::Error (execution expired):
    /usr/lib/ruby/1.8/timeout.rb:60:in `open'
    /usr/lib/ruby/1.8/net/smtp.rb:551:in `do_start'
    /usr/lib/ruby/1.8/net/smtp.rb:551:in `do_start'
    /usr/lib/ruby/1.8/net/smtp.rb:525:in `start'
    /usr/lib/ruby/1.8/net/smtp.rb:463:in `start'
    /usr/lib/ruby/gems/1.8/gems/actionmailer-2.1.0/lib/action_mailer/base.rb:627:in
`perform_delivery_smtp'
    /usr/lib/ruby/gems/1.8/gems/actionmailer-2.1.0/lib/action_mailer/base.rb:508:in
`__send__'
    /usr/lib/ruby/gems/1.8/gems/actionmailer-2.1.0/lib/action_mailer/base.rb:508:in
`deliver!'
    /usr/lib/ruby/gems/1.8/gems/actionmailer-2.1.0/lib/action_mailer/base.rb:383:in
`method_missing'
    /app/controllers/home_controller.rb:38:in `sendmail'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:1162:in
`send'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:1162:in
`perform_action_without_filters'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/filters.rb:580:in
`call_filters'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/filters.rb:573:in
`perform_action_without_benchmark'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/benchmarking.rb:68:in
`perform_action_without_rescue'
    /usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/benchmarking.rb:68:in
`perform_action_without_rescue'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/rescue.rb:201:in
`perform_action_without_caching'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/caching/sql_cache.rb:13:in
`passenger_orig_perform_action'
    /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/abstract/query_cache.rb:33:in
`cache'
    /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/query_cache.rb:8:in
`cache'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/caching/sql_cache.rb:12:in
`passenger_orig_perform_action'
    /usr/lib/ruby/gems/1.8/gems/passenger-2.1.2/lib/phusion_passenger/railz/request_handler.rb:53:in
`perform_action'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:529:in
`send'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:529:in
`process_without_filters'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/filters.rb:569:in
`process_without_session_management_support'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/session_management.rb:130:in
`process'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:389:in
`process'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:149:in
`handle_request'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:107:in
`dispatch'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:104:in
`synchronize'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:104:in
`dispatch'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:120:in
`dispatch_cgi'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:35:in
`dispatch'
    /usr/lib/ruby/gems/1.8/gems/passenger-2.1.2/lib/phusion_passenger/railz/request_handler.rb:38:in
`process_request'
    /usr/lib/ruby/gems/1.8/gems/passenger-2.1.2/lib/phusion_passenger/abstract_request_handler.rb:197:in
`main_loop'
    /usr/lib/ruby/gems/1.8/gems/passenger-2.1.2/lib/phusion_passenger/railz/application_spawner.rb:340:in
`start_request_handler'
    /usr/lib/ruby/gems/1.8/gems/passenger-2.1.2/lib/phusion_passenger/railz/application_spawner.rb:298:in
`handle_spawn_application'
    /usr/lib/ruby/gems/1.8/gems/passenger-2.1.2/lib/phusion_passenger/utils.rb:176:in
`safe_fork'
    /usr/lib/ruby/gems/1.8/gems/passenger-2.1.2/lib/phusion_passenger/railz/application_spawner.rb:296:in
`handle_spawn_application'
    /usr/lib/ruby/gems/1.8/gems/passenger-2.1.2/lib/phusion_passenger/abstract_server.rb:332:in
`__send__'
    /usr/lib/ruby/gems/1.8/gems/passenger-2.1.2/lib/phusion_passenger/abstract_server.rb:332:in
`main_loop'
    /usr/lib/ruby/gems/1.8/gems/passenger-2.1.2/lib/phusion_passenger/abstract_server.rb:182:in
`start_synchronously'
    /usr/lib/ruby/gems/1.8/gems/passenger-2.1.2/lib/phusion_passenger/abstract_server.rb:149:in
`start'
    /usr/lib/ruby/gems/1.8/gems/passenger-2.1.2/lib/phusion_passenger/railz/application_spawner.rb:192:in
`start'
    /usr/lib/ruby/gems/1.8/gems/passenger-2.1.2/lib/phusion_passenger/spawn_manager.rb:260:in
`spawn_rails_application'
    /usr/lib/ruby/gems/1.8/gems/passenger-2.1.2/lib/phusion_passenger/abstract_server_collection.rb:121:in
`lookup_or_add'
    /usr/lib/ruby/gems/1.8/gems/passenger-2.1.2/lib/phusion_passenger/spawn_manager.rb:254:in
`spawn_rails_application'
    /usr/lib/ruby/gems/1.8/gems/passenger-2.1.2/lib/phusion_passenger/abstract_server_collection.rb:75:in
`synchronize'
    /usr/lib/ruby/gems/1.8/gems/passenger-2.1.2/lib/phusion_passenger/abstract_server_collection.rb:74:in
`synchronize'
    /usr/lib/ruby/gems/1.8/gems/passenger-2.1.2/lib/phusion_passenger/spawn_manager.rb:253:in
`spawn_rails_application'
    /usr/lib/ruby/gems/1.8/gems/passenger-2.1.2/lib/phusion_passenger/spawn_manager.rb:148:in
`spawn_application'
    /usr/lib/ruby/gems/1.8/gems/passenger-2.1.2/lib/phusion_passenger/spawn_manager.rb:285:in
`handle_spawn_application'
    /usr/lib/ruby/gems/1.8/gems/passenger-2.1.2/lib/phusion_passenger/abstract_server.rb:332:in
`__send__'
    /usr/lib/ruby/gems/1.8/gems/passenger-2.1.2/lib/phusion_passenger/abstract_server.rb:332:in
`main_loop'
    /usr/lib/ruby/gems/1.8/gems/passenger-2.1.2/lib/phusion_passenger/abstract_server.rb:182:in
`start_synchronously'
    /usr/lib/ruby/gems/1.8/gems/passenger-2.1.2/bin/passenger-spawn-server:50
775dc78d64c87ae51db522529c3784e9?d=identicon&s=25 Phillip (Guest)
on 2009-05-15 18:11
(Received via mailing list)
try this for fun...

{
                            :address =>'localhost',
                            :port=>25,
                            :domain =>'localhost.localdomain',
                            :authentication => :plain,
                            :user_name => nil,
                            :password => nil,
                            :tls => false }



On Mar 26, 6:11 am, Touch Ponlork <rails-mailing-l...@andreas-s.net>
This topic is locked and can not be replied to.