电子邮件不使用 Mandrill 发送的问题 -> 部署到 Heroku

Issue with Email not sending using Mandrill -> Deploying to Heroku

我正在设置我的 AacionMailer,老实说,我以前从未这样做过。我看了一个又一个视频,并在 post 突然无济于事后阅读了 post...

我通过 PapertrailApp 捕获的日志错误是 Net::SMTPServerBusy (454 4.7.1 : Relay access denied):

我似乎无法让 mandrill 向我发送确认电子邮件以登录该应用程序。我正在使用 locahost:3000 进行开发,只是捕捉链接进行确认,这工作正常,但对于生产...有点需要这个工作..

这是我的 production.rb 文件:

  config.action_mailer.delivery_method = :smtp
  config.action_mailer.default_url_options = { :host => 'patrolprorms.heroku.com' }

  config.action_mailer.smtp_settings = {
  :address => "smtp.mandrillapp.com",
  :port => 25,
  :user_name => ENV['MANDRILL_USERNAME'],
  :password => ENV['MANDRILL_API_KEY'],
  :authentication => 'plain',
  :enable_starttls_auto => true,
  :openssl_verify_mode  => 'none'
}

这是我的 development.rb 文件

  config.action_mailer.delivery_method = :smtp
  config.action_mailer.default_url_options = { :host => 'localhost:3000' }

  config.action_mailer.smtp_settings = {
  :address => "smtp.mandrillapp.com",
  :port => 465,
  :user_name => ENV['MADRILL_USERNAME'],
  :password => ENV['MANDRILL_API_KEY'],
  :authentication => 'plain',
  :enable_starttls_auto => true,
}

这是我在尝试使用端口 2525 时收到的错误

Net::SMTPServerBusy (421 4.7.0 relay-7.us-east-1.relay-prod Error: too many errors ):

使用端口 465 我得到这个错误

at=error code=H12 desc="Request timeout" method=POST path="/users/confirmation" host=patrolprorms.herokuapp.com request_id=8dfa122b-ab01-4dbc-97d6-0e7640014f08 fwd="68.144.5.70" dyno=web.1 connect=1ms service=30001ms status=503 bytes=0

基于我认为我取得了一些进展的错误???或者掉更多的头发.. 还不确定是哪一个。

这是由 heroku --tail 生成的日志文件(我什至不知道从哪里开始,我很抱歉太长了。请不要犹豫,发表评论要求查看我的更多文件!!!

2015-08-05T03:13:10.057799+00:00 app[web.2]: source=rack-timeout id=2e30bfc7-6b34-4a87-872b-438c09f9cf71 wait=6ms timeout=15000ms state=ready
2015-08-05T03:13:10.061201+00:00 app[web.2]: Started POST "/users/confirmation" for 68.144.5.70 at 2015-08-05 03:13:10 +0000
2015-08-05T03:13:10.058707+00:00 app[web.2]: source=rack-timeout id=2e30bfc7-6b34-4a87-872b-438c09f9cf71 wait=6ms timeout=15000ms service=1ms state=active
2015-08-05T03:13:10.080546+00:00 app[web.2]: Processing by Devise::ConfirmationsController#create as HTML
2015-08-05T03:13:10.097976+00:00 app[web.2]:   User Load (1.2ms)  SELECT  "users".* FROM "users" WHERE "users"."email" =   ORDER BY "users"."id" ASC LIMIT 1  [["email", "swilson@taurenltd.com"]]
2015-08-05T03:13:10.080589+00:00 app[web.2]:   Parameters: {"utf8"=>"✓", "authenticity_token"=>"KllMOhJfb7tOE4s2XaKAB5XMl7Mnb2nwaz1uyY5lyKBzUBSkaEeBW0Kbwvw+DfVVJzzErJYh1Td3LjKBFWBU1w==", "user"=>{"email"=>"swilson@taurenltd.com"}, "commit"=>"Resend confirmation instructions"}
2015-08-05T03:13:10.092454+00:00 app[web.2]:   User Load (1.7ms)  SELECT  "users".* FROM "users" WHERE "users"."unconfirmed_email" =   ORDER BY "users"."id" ASC LIMIT 1  [["unconfirmed_email", "swilson@taurenltd.com"]]
2015-08-05T03:13:10.324637+00:00 app[web.2]:   User Load (1.4ms)  SELECT  "users".* FROM "users" WHERE "users"."confirmation_token" =   ORDER BY "users"."id" ASC LIMIT 1  [["confirmation_token", "b7f3914b2e94209c6c7c02ee0d43cfab3a5bdd1e96d49611789eecf8989cb1e9"]]
2015-08-05T03:13:10.331436+00:00 app[web.2]:   SQL (1.0ms)  UPDATE "users" SET "confirmation_token" = , "confirmation_sent_at" = , "updated_at" =  WHERE "users"."id" =   [["confirmation_token", "b7f3914b2e94209c6c7c02ee0d43cfab3a5bdd1e96d49611789eecf8989cb1e9"], ["confirmation_sent_at", "2015-08-05 03:13:10.325301"], ["updated_at", "2015-08-05 03:13:10.327429"], ["id", 3]]
2015-08-05T03:13:10.344986+00:00 app[web.2]:   Rendered devise/mailer/confirmation_instructions.html.erb (1.6ms)
2015-08-05T03:13:10.326623+00:00 app[web.2]:    (0.7ms)  BEGIN
2015-08-05T03:13:10.334462+00:00 app[web.2]:    (1.9ms)  COMMIT
2015-08-05T03:13:10.678128+00:00 app[web.2]:
2015-08-05T03:13:10.678134+00:00 app[web.2]: Devise::Mailer#confirmation_instructions: processed outbound mail in 340.9ms
2015-08-05T03:13:11.058190+00:00 app[web.2]: source=rack-timeout id=2e30bfc7-6b34-4a87-872b-438c09f9cf71 wait=6ms timeout=15000ms service=1000ms state=active
2015-08-05T03:13:12.058224+00:00 app[web.2]: source=rack-timeout id=2e30bfc7-6b34-4a87-872b-438c09f9cf71 wait=6ms timeout=15000ms service=2000ms state=active
2015-08-05T03:13:13.058225+00:00 app[web.2]: source=rack-timeout id=2e30bfc7-6b34-4a87-872b-438c09f9cf71 wait=6ms timeout=15000ms service=3000ms state=active
2015-08-05T03:13:14.058223+00:00 app[web.2]: source=rack-timeout id=2e30bfc7-6b34-4a87-872b-438c09f9cf71 wait=6ms timeout=15000ms service=4000ms state=active
2015-08-05T03:13:15.058135+00:00 app[web.2]: source=rack-timeout id=2e30bfc7-6b34-4a87-872b-438c09f9cf71 wait=6ms timeout=15000ms service=5000ms state=active
2015-08-05T03:13:16.058333+00:00 app[web.2]: source=rack-timeout id=2e30bfc7-6b34-4a87-872b-438c09f9cf71 wait=6ms timeout=15000ms service=6001ms state=active
2015-08-05T03:13:17.058342+00:00 app[web.2]: source=rack-timeout id=2e30bfc7-6b34-4a87-872b-438c09f9cf71 wait=6ms timeout=15000ms service=7000ms state=active
2015-08-05T03:13:18.058303+00:00 app[web.2]: source=rack-timeout id=2e30bfc7-6b34-4a87-872b-438c09f9cf71 wait=6ms timeout=15000ms service=8000ms state=active
2015-08-05T03:13:19.058618+00:00 app[web.2]: source=rack-timeout id=2e30bfc7-6b34-4a87-872b-438c09f9cf71 wait=6ms timeout=15000ms service=9001ms state=active
2015-08-05T03:13:20.058189+00:00 app[web.2]: source=rack-timeout id=2e30bfc7-6b34-4a87-872b-438c09f9cf71 wait=6ms timeout=15000ms service=10000ms state=active
2015-08-05T03:13:21.058132+00:00 app[web.2]: source=rack-timeout id=2e30bfc7-6b34-4a87-872b-438c09f9cf71 wait=6ms timeout=15000ms service=11000ms state=active
2015-08-05T03:13:22.058166+00:00 app[web.2]: source=rack-timeout id=2e30bfc7-6b34-4a87-872b-438c09f9cf71 wait=6ms timeout=15000ms service=12000ms state=active
2015-08-05T03:13:23.058203+00:00 app[web.2]: source=rack-timeout id=2e30bfc7-6b34-4a87-872b-438c09f9cf71 wait=6ms timeout=15000ms service=13000ms state=active
2015-08-05T03:13:24.058232+00:00 app[web.2]: source=rack-timeout id=2e30bfc7-6b34-4a87-872b-438c09f9cf71 wait=6ms timeout=15000ms service=14000ms state=active
2015-08-05T03:13:25.082651+00:00 heroku[router]: at=info method=POST path="/users/confirmation" host=patrolprorms.herokuapp.com request_id=2e30bfc7-6b34-4a87-872b-438c09f9cf71 fwd="68.144.5.70" dyno=web.2 connect=1ms service=15025ms status=500 bytes=1755
2015-08-05T03:13:25.059345+00:00 app[web.2]: source=rack-timeout id=2e30bfc7-6b34-4a87-872b-438c09f9cf71 wait=6ms timeout=15000ms service=15001ms state=timed_out
2015-08-05T03:13:25.073324+00:00 app[web.2]:
2015-08-05T03:13:25.073336+00:00 app[web.2]: Rack::Timeout::RequestTimeoutError (Request waited 6ms, then ran for longer than 15000ms):
2015-08-05T03:13:25.073338+00:00 app[web.2]:   vendor/ruby-2.0.0/lib/ruby/2.0.0/net/protocol.rb:155:in `select'
2015-08-05T03:13:25.073339+00:00 app[web.2]:   vendor/ruby-2.0.0/lib/ruby/2.0.0/net/protocol.rb:155:in `rescue in rbuf_fill'
2015-08-05T03:13:25.073340+00:00 app[web.2]:   vendor/ruby-2.0.0/lib/ruby/2.0.0/net/protocol.rb:152:in `rbuf_fill'
2015-08-05T03:13:25.073342+00:00 app[web.2]:   vendor/ruby-2.0.0/lib/ruby/2.0.0/net/protocol.rb:134:in `readuntil'
2015-08-05T03:13:25.073343+00:00 app[web.2]:   vendor/ruby-2.0.0/lib/ruby/2.0.0/net/protocol.rb:144:in `readline'
2015-08-05T03:13:25.073344+00:00 app[web.2]:   vendor/ruby-2.0.0/lib/ruby/2.0.0/net/smtp.rb:932:in `recv_response'
2015-08-05T03:13:25.073345+00:00 app[web.2]:   vendor/ruby-2.0.0/lib/ruby/2.0.0/net/smtp.rb:555:in `block in do_start'
2015-08-05T03:13:25.073346+00:00 app[web.2]:   vendor/ruby-2.0.0/lib/ruby/2.0.0/net/smtp.rb:942:in `critical'
2015-08-05T03:13:25.073348+00:00 app[web.2]:   vendor/ruby-2.0.0/lib/ruby/2.0.0/net/smtp.rb:555:in `do_start'
2015-08-05T03:13:25.073349+00:00 app[web.2]:   vendor/ruby-2.0.0/lib/ruby/2.0.0/net/smtp.rb:520:in `start'
2015-08-05T03:13:25.073351+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/mail-2.6.3/lib/mail/network/delivery_methods/smtp.rb:112:in `deliver!'
2015-08-05T03:13:25.073352+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/mail-2.6.3/lib/mail/message.rb:2141:in `do_delivery'
2015-08-05T03:13:25.073353+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/mail-2.6.3/lib/mail/message.rb:236:in `block in deliver'
2015-08-05T03:13:25.073355+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/actionmailer-4.2.3/lib/action_mailer/base.rb:543:in `block in deliver_mail'
2015-08-05T03:13:25.073356+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.3/lib/active_support/notifications.rb:164:in `block in instrument'
2015-08-05T03:13:25.073358+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.3/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
2015-08-05T03:13:25.073359+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.3/lib/active_support/notifications.rb:164:in `instrument'
2015-08-05T03:13:25.073360+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/actionmailer-4.2.3/lib/action_mailer/base.rb:541:in `deliver_mail'
2015-08-05T03:13:25.073361+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/mail-2.6.3/lib/mail/message.rb:236:in `deliver'
2015-08-05T03:13:25.073362+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/actionmailer-4.2.3/lib/action_mailer/message_delivery.rb:85:in `deliver_now'
2015-08-05T03:13:25.073363+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/devise-3.4.1/lib/devise/models/authenticatable.rb:176:in `send_devise_notification'
2015-08-05T03:13:25.073365+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/devise-3.4.1/lib/devise/models/confirmable.rb:102:in `send_confirmation_instructions'
2015-08-05T03:13:25.073366+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/devise-3.4.1/lib/devise/models/confirmable.rb:117:in `block in resend_confirmation_instructions'
2015-08-05T03:13:25.073367+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/devise-3.4.1/lib/devise/models/confirmable.rb:211:in `pending_any_confirmation'
2015-08-05T03:13:25.073369+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/devise-3.4.1/lib/devise/models/confirmable.rb:116:in `resend_confirmation_instructions'
2015-08-05T03:13:25.073370+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/devise-3.4.1/lib/devise/models/confirmable.rb:265:in `send_confirmation_instructions'
2015-08-05T03:13:25.073371+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/devise-3.4.1/app/controllers/devise/confirmations_controller.rb:9:in `create'
2015-08-05T03:13:25.073372+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.3/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
2015-08-05T03:13:25.073373+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.3/lib/abstract_controller/base.rb:198:in `process_action'
2015-08-05T03:13:25.073375+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.3/lib/action_controller/metal/rendering.rb:10:in `process_action'
2015-08-05T03:13:25.073376+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.3/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
2015-08-05T03:13:25.073377+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:115:in `call'
2015-08-05T03:13:25.073378+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:115:in `call'
2015-08-05T03:13:25.073379+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:553:in `block (2 levels) in compile'
2015-08-05T03:13:25.073380+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:503:in `call'
2015-08-05T03:13:25.073381+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:503:in `call'
2015-08-05T03:13:25.073382+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:88:in `run_callbacks'
2015-08-05T03:13:25.073383+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.3/lib/abstract_controller/callbacks.rb:19:in `process_action'
2015-08-05T03:13:25.073384+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.3/lib/action_controller/metal/rescue.rb:29:in `process_action'
2015-08-05T03:13:25.073385+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.3/lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
2015-08-05T03:13:25.075049+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.3/lib/active_support/notifications.rb:164:in `block in instrument'
2015-08-05T03:13:25.075051+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.3/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
2015-08-05T03:13:25.075053+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.3/lib/active_support/notifications.rb:164:in `instrument'
2015-08-05T03:13:25.075054+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.3/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
2015-08-05T03:13:25.075055+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.3/lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
2015-08-05T03:13:25.075056+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.3/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
2015-08-05T03:13:25.075058+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.3/lib/abstract_controller/base.rb:137:in `process'
2015-08-05T03:13:25.075059+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/actionview-4.2.3/lib/action_view/rendering.rb:30:in `process'
2015-08-05T03:13:25.075060+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.3/lib/action_controller/metal.rb:196:in `dispatch'
2015-08-05T03:13:25.075061+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.3/lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
2015-08-05T03:13:25.075076+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.3/lib/action_controller/metal.rb:237:in `block in action'
2015-08-05T03:13:25.075077+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.3/lib/action_dispatch/routing/route_set.rb:76:in `call'
2015-08-05T03:13:25.075078+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.3/lib/action_dispatch/routing/route_set.rb:76:in `dispatch'
2015-08-05T03:13:25.075080+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.3/lib/action_dispatch/routing/route_set.rb:45:in `serve'
2015-08-05T03:13:25.075081+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.3/lib/action_dispatch/routing/mapper.rb:49:in `serve'
2015-08-05T03:13:25.075082+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.3/lib/action_dispatch/journey/router.rb:43:in `block in serve'
2015-08-05T03:13:25.075083+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.3/lib/action_dispatch/journey/router.rb:30:in `each'
2015-08-05T03:13:25.075084+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.3/lib/action_dispatch/journey/router.rb:30:in `serve'
2015-08-05T03:13:25.075087+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.3/lib/action_dispatch/routing/route_set.rb:821:in `call'
2015-08-05T03:13:25.075088+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.11.0.283/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
2015-08-05T03:13:25.075091+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.11.0.283/lib/new_relic/rack/agent_hooks.rb:30:in `traced_call'
2015-08-05T03:13:25.075092+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.11.0.283/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
2015-08-05T03:13:25.075094+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.11.0.283/lib/new_relic/rack/browser_monitoring.rb:23:in `traced_call'
2015-08-05T03:13:25.075095+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.11.0.283/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
2015-08-05T03:13:25.075096+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/warden-1.2.3/lib/warden/manager.rb:35:in `block in call'
2015-08-05T03:13:25.075097+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/warden-1.2.3/lib/warden/manager.rb:34:in `catch'
2015-08-05T03:13:25.075099+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/warden-1.2.3/lib/warden/manager.rb:34:in `call'
2015-08-05T03:13:25.075100+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.11.0.283/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
2015-08-05T03:13:25.075101+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/etag.rb:24:in `call'
2015-08-05T03:13:25.075102+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.11.0.283/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
2015-08-05T03:13:25.075103+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/conditionalget.rb:38:in `call'
2015-08-05T03:13:25.075105+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.11.0.283/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
2015-08-05T03:13:25.075106+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/head.rb:13:in `call'
2015-08-05T03:13:25.075108+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.11.0.283/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
2015-08-05T03:13:25.075109+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.3/lib/action_dispatch/middleware/params_parser.rb:27:in `call'
2015-08-05T03:13:25.075110+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.11.0.283/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
2015-08-05T03:13:25.075111+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.3/lib/action_dispatch/middleware/flash.rb:260:in `call'
2015-08-05T03:13:25.075116+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.11.0.283/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
2015-08-05T03:13:25.075148+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/session/abstract/id.rb:225:in `context'
2015-08-05T03:13:25.075150+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/session/abstract/id.rb:220:in `call'
2015-08-05T03:13:25.075151+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.11.0.283/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
2015-08-05T03:13:25.075152+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.3/lib/action_dispatch/middleware/cookies.rb:560:in `call'
2015-08-05T03:13:25.075154+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.11.0.283/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
2015-08-05T03:13:25.075155+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.3/lib/active_record/query_cache.rb:36:in `call'
2015-08-05T03:13:25.075156+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.11.0.283/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
2015-08-05T03:13:25.075157+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:653:in `call'
2015-08-05T03:13:25.075159+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.11.0.283/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
2015-08-05T03:13:25.075160+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.3/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
2015-08-05T03:13:25.075161+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:84:in `run_callbacks'
2015-08-05T03:13:25.075162+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.3/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
2015-08-05T03:13:25.075163+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.11.0.283/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
2015-08-05T03:13:25.075165+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.3/lib/action_dispatch/middleware/remote_ip.rb:78:in `call'
2015-08-05T03:13:25.075166+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.11.0.283/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
2015-08-05T03:13:25.075167+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.3/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
2015-08-05T03:13:25.075168+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.11.0.283/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
2015-08-05T03:13:25.075169+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.3/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
2015-08-05T03:13:25.075170+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.11.0.283/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
2015-08-05T03:13:25.075171+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/railties-4.2.3/lib/rails/rack/logger.rb:38:in `call_app'
2015-08-05T03:13:25.075172+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/railties-4.2.3/lib/rails/rack/logger.rb:20:in `block in call'
2015-08-05T03:13:25.075173+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.3/lib/active_support/tagged_logging.rb:68:in `block in tagged'
2015-08-05T03:13:25.075175+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.3/lib/active_support/tagged_logging.rb:26:in `tagged'
2015-08-05T03:13:25.075176+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.3/lib/active_support/tagged_logging.rb:68:in `tagged'
2015-08-05T03:13:25.075177+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/railties-4.2.3/lib/rails/rack/logger.rb:20:in `call'
2015-08-05T03:13:25.075178+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.11.0.283/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
2015-08-05T03:13:25.075179+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.3/lib/action_dispatch/middleware/request_id.rb:21:in `call'
2015-08-05T03:13:25.075180+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.11.0.283/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
2015-08-05T03:13:25.075182+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/methodoverride.rb:22:in `call'
2015-08-05T03:13:25.075183+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.11.0.283/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
2015-08-05T03:13:25.075185+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/runtime.rb:18:in `call'
2015-08-05T03:13:25.068901+00:00 app[web.2]:
2015-08-05T03:13:25.075186+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.11.0.283/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
2015-08-05T03:13:25.068905+00:00 app[web.2]: Sent mail to swilson@taurenltd.com (14390.5ms)
2015-08-05T03:13:25.068972+00:00 app[web.2]: Date: Wed, 05 Aug 2015 03:13:10 +0000
2015-08-05T03:13:25.068974+00:00 app[web.2]: From: admin@patrolprorms.com
2015-08-05T03:13:25.068975+00:00 app[web.2]: Reply-To: admin@patrolprorms.com
2015-08-05T03:13:25.068976+00:00 app[web.2]: To: swilson@taurenltd.com
2015-08-05T03:13:25.075187+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.3/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
2015-08-05T03:13:25.075188+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.11.0.283/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
2015-08-05T03:13:25.068978+00:00 app[web.2]: Message-ID: <55c17f46a6750_33fcc653f6490439a0@f547e1bc-2195-4acf-aa76-162e2f3c820a.mail>
2015-08-05T03:13:25.075189+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.3/lib/action_dispatch/middleware/static.rb:116:in `call'
2015-08-05T03:13:25.075190+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.11.0.283/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
2015-08-05T03:13:25.068979+00:00 app[web.2]: Subject: Confirmation instructions
2015-08-05T03:13:25.075195+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/sendfile.rb:113:in `call'
2015-08-05T03:13:25.068980+00:00 app[web.2]: Mime-Version: 1.0
2015-08-05T03:13:25.075213+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.11.0.283/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
2015-08-05T03:13:25.075215+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/rack-timeout-0.2.4/lib/rack/timeout.rb:108:in `call'
2015-08-05T03:13:25.075216+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.11.0.283/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
2015-08-05T03:13:25.068981+00:00 app[web.2]: Content-Type: text/html;
2015-08-05T03:13:25.075217+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/railties-4.2.3/lib/rails/engine.rb:518:in `call'
2015-08-05T03:13:25.075219+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/railties-4.2.3/lib/rails/application.rb:165:in `call'
2015-08-05T03:13:25.075220+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.11.0.283/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
2015-08-05T03:13:25.075221+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/lock.rb:17:in `call'
2015-08-05T03:13:25.075222+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/content_length.rb:15:in `call'
2015-08-05T03:13:25.075223+00:00 app[web.2]:   vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/handler/webrick.rb:88:in `service'
2015-08-05T03:13:25.075225+00:00 app[web.2]:   vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service'
2015-08-05T03:13:25.075226+00:00 app[web.2]:   vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'
2015-08-05T03:13:25.075232+00:00 app[web.2]:   vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'
2015-08-05T03:13:25.075234+00:00 app[web.2]:
2015-08-05T03:13:25.075235+00:00 app[web.2]:
2015-08-05T03:13:25.076101+00:00 app[web.2]: source=rack-timeout id=2e30bfc7-6b34-4a87-872b-438c09f9cf71 wait=6ms timeout=15000ms service=15018ms state=completed
2015-08-05T03:13:25.068985+00:00 app[web.2]:  charset=UTF-8
2015-08-05T03:13:25.068986+00:00 app[web.2]: Content-Transfer-Encoding: 7bit
2015-08-05T03:13:25.068987+00:00 app[web.2]:
2015-08-05T03:13:25.068988+00:00 app[web.2]: <p>Welcome swilson@taurenltd.com!</p>
2015-08-05T03:13:25.068990+00:00 app[web.2]:
2015-08-05T03:13:25.068991+00:00 app[web.2]: <p>You can confirm your account email through the link below:</p>
2015-08-05T03:13:25.068992+00:00 app[web.2]:
2015-08-05T03:13:25.068994+00:00 app[web.2]: <p><a href="http://patrolprorms.heroku.com/users/confirmation?confirmation_token=6y3Hi7GpaQCvsme54C4_">Confirm my account</a></p>
2015-08-05T03:13:25.068995+00:00 app[web.2]:
2015-08-05T03:13:25.069753+00:00 app[web.2]: Completed 500 Internal Server Error in 14989ms (ActiveRecord: 8.8ms)
Any help will be greatly appreciated to resolve this!

因此,当您将端口更改为 2525 时,您正在连接到 Mandrill 的服务器,但出现错误。 "Too many errors" 表示您的服务器遇到了一种错误(通常与身份验证相关),但尽管存在这些错误,仍继续尝试发送。然后 Mandrill 正在限制连接以避免来自未修复导致发送过程中错误的内容的服务器的持续连接。

要进一步调试,请仔细检查您在 ENV['MANDRILL_APIKEY'] 中的 Mandrill 凭据是否正确,然后将以下内容添加到您的环境文件中以执行传送并在出现传送错误时引发传送错误:

config.action_mailer.perform_deliveries = true
config.action_mailer.raise_delivery_errors = true

这样做的目的是让 ActionMailer 不会默默地忽略错误,因此根据您的设置方式和测试环境,存在将这些错误暴露给最终用户的风险。但它将允许您查看实际写入 SMTP 连接的内容,以便进一步排除故障。在尝试再次发送之前,您需要重新启动您的应用程序。