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 -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> 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:62 7:in > `perform_delivery_smtp'' > /usr/lib/ruby/gems/1.8/gems/actionmailer-2.1.0/lib/action_mailer/base.rb:50 8:in > `__send__'' > /usr/lib/ruby/gems/1.8/gems/actionmailer-2.1.0/lib/action_mailer/base.rb:50 8:in > `deliver!'' > /usr/lib/ruby/gems/1.8/gems/actionmailer-2.1.0/lib/action_mailer/base.rb:38 3: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/benchmar king.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/benchmar king.rb:68:in > `perform_action_without_rescue'' > /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/rescue.r b: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_cach e.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/req uest_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/dispatch er.rb:149:in > `handle_request'' > /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatch er.rb:107:in > `dispatch'' > /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatch er.rb:104:in > `synchronize'' > /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatch er.rb:104:in > `dispatch'' > /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatch er.rb:120:in > `dispatch_cgi'' > /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatch er.rb:35:in > `dispatch'' > /usr/lib/ruby/gems/1.8/gems/passenger-2.1.2/lib/phusion_passenger/railz/req uest_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/app lication_spawner.rb:340:in > `start_request_handler'' > /usr/lib/ruby/gems/1.8/gems/passenger-2.1.2/lib/phusion_passenger/railz/app lication_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/app lication_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/app lication_spawner.rb:192:in > `start'' > /usr/lib/ruby/gems/1.8/gems/passenger-2.1.2/lib/phusion_passenger/spawn_man ager.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_man ager.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_man ager.rb:253:in > `spawn_rails_application'' > /usr/lib/ruby/gems/1.8/gems/passenger-2.1.2/lib/phusion_passenger/spawn_man ager.rb:148:in > `spawn_application'' > /usr/lib/ruby/gems/1.8/gems/passenger-2.1.2/lib/phusion_passenger/spawn_man ager.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 > -- > Posted viahttp://www.ruby-forum.com/.
Reasonably Related Threads
- ctionView::TemplateError (undefined method `start_form_tag'
- internal server error(500) when attempting to sendmail
- Errno::ENETUNREACH (Network is unreachable - connect(2)):
- desperate, errors with file upload
- A frustrating and strange error when config.action_controller.perform_caching = true