Heroku环境中的Ruby on Rails应用程序:"使用Mailgun发送电子邮件"错误

时间:2017-02-24 20:46:23

标签: ruby-on-rails ruby heroku mailgun cloud9

我正在尝试测试从基于Heroku服务器的Rails应用程序的联系表单发送电子邮件,我收到错误消息:

我们很抱歉,但出了点问题。如果您是应用程序所有者,请检查日志以获取更多信息。

我的目的是学习如何将邮件服务器服务集成到我的Heroku帐户中。为此,使用的插件是MailGun。我甚至用我的个人电子邮件创建了一个MailGun帐户,以便检查我是否收到了这些电子邮件。

将Cloud9环境中的代码成功部署到Heroku服务器之后,我在Ruby代码中所做的唯一更改就是以下内容:

到config / environment.rb

ActionMailer::Base.smtp_settings = {
  :port           => ENV['MAILGUN_SMTP_PORT'],
  :address        => ENV['MAILGUN_SMTP_SERVER'],
  :user_name      => ENV['MAILGUN_SMTP_LOGIN'],
  :password       => ENV['MAILGUN_SMTP_PASSWORD'],
  :domain         => 'blahblahblah.herokuapp.com',
  :authentication => :plain,
}
ActionMailer::Base.delivery_method = :smtp

问题是什么?解决方案的任何提示?

更新的请求信息(Heroku日志 - 由于StackOverflow正文中的字符限制,我无法更新所有日志):

iamsamuel:~/workspace/saasapp (master) $ heroku logs
2017-02-24T20:18:19.316716+00:00 app[web.1]: Content-Type: text/html;
2017-02-24T20:18:19.316717+00:00 app[web.1]:  charset=UTF-8
2017-02-24T20:18:19.316718+00:00 app[web.1]: Content-Transfer-Encoding: 7bit
2017-02-24T20:18:19.316718+00:00 app[web.1]:
2017-02-24T20:18:19.316719+00:00 app[web.1]: <!DOCTYPE html>
2017-02-24T20:18:19.316719+00:00 app[web.1]: <html>
2017-02-24T20:18:19.316720+00:00 app[web.1]:     <head>
2017-02-24T20:18:19.316721+00:00 app[web.1]:     </head>
2017-02-24T20:18:19.316721+00:00 app[web.1]:     <body>
2017-02-24T20:18:19.316722+00:00 app[web.1]:         <p>
2017-02-24T20:18:19.316723+00:00 app[web.1]:             You have received a message from the site's contact form, from Sam, smlmrr@outlook.com.
2017-02-24T20:18:19.316724+00:00 app[web.1]:         </p>
2017-02-24T20:18:19.316724+00:00 app[web.1]:         <p>
2017-02-24T20:18:19.316725+00:00 app[web.1]:
2017-02-24T20:18:19.316725+00:00 app[web.1]:         </p>
2017-02-24T20:18:19.316726+00:00 app[web.1]:     </body>
2017-02-24T20:18:19.316726+00:00 app[web.1]: </html>
2017-02-24T20:18:19.316886+00:00 app[web.1]: I, [2017-02-24T20:18:19.316838 #4]  INFO -- : [f024cbfb-df8b-4efa-8cb1-50a6a0d7881c] Completed 500 Internal Server Error in 1166ms (ActiveRecord: 4.1ms)
2017-02-24T20:18:19.317316+00:00 app[web.1]: F, [2017-02-24T20:18:19.317273 #4] FATAL -- : [f024cbfb-df8b-4efa-8cb1-50a6a0d7881c]
2017-02-24T20:18:19.317357+00:00 app[web.1]: F, [2017-02-24T20:18:19.317318 #4] FATAL -- : [f024cbfb-df8b-4efa-8cb1-50a6a0d7881c] Net::SMTPFatalError (554 Please activate your Mailgun account. Check your inbox or log in to your control panel to resend the activation email.
2017-02-24T20:18:19.317358+00:00 app[web.1]: ):
2017-02-24T20:18:19.317396+00:00 app[web.1]: F, [2017-02-24T20:18:19.317355 #4] FATAL -- : [f024cbfb-df8b-4efa-8cb1-50a6a0d7881c]
2017-02-24T20:18:19.317435+00:00 app[web.1]: F, [2017-02-24T20:18:19.317396 #4] FATAL -- : [f024cbfb-df8b-4efa-8cb1-50a6a0d7881c] app/controllers/contacts_controller.rb:15:in `create'
2017-02-24T20:18:19.520898+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=infinite-forest-28304.herokuapp.com request_id=62153ff0-bef7-4e44-958b-447fb18e7c23 fwd="188.83.235.112" dyno=web.1 connect=0ms service=1ms status=304 bytes=48
2017-02-24T20:53:16.169251+00:00 heroku[web.1]: Idling
2017-02-24T20:53:16.169901+00:00 heroku[web.1]: State changed from up to down
2017-02-24T20:53:17.034264+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2017-02-24T20:53:17.078764+00:00 app[web.1]: - Gracefully stopping, waiting for requests to finish
2017-02-24T20:53:17.078952+00:00 app[web.1]: === puma shutdown: 2017-02-24 20:53:17 +0000 ===
2017-02-24T20:53:17.078957+00:00 app[web.1]: - Goodbye!
2017-02-24T20:53:17.079100+00:00 app[web.1]: Exiting
2017-02-24T20:53:17.347515+00:00 heroku[web.1]: Process exited with status 0
2017-02-24T20:57:24.680979+00:00 heroku[web.1]: Unidling
2017-02-24T20:57:24.681258+00:00 heroku[web.1]: State changed from down to starting
2017-02-24T20:57:27.221989+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 44473 -e production`
2017-02-24T20:57:30.299354+00:00 app[web.1]: => Booting Puma
2017-02-24T20:57:30.299447+00:00 app[web.1]: => Rails 5.0.0 application starting in production on http://0.0.0.0:44473
2017-02-24T20:57:30.299502+00:00 app[web.1]: => Run `rails server -h` for more startup options
2017-02-24T20:57:31.229688+00:00 app[web.1]: Puma starting in single mode...
2017-02-24T20:57:31.229714+00:00 app[web.1]: * Min threads: 5, max threads: 5
2017-02-24T20:57:31.229713+00:00 app[web.1]: * Version 3.4.0 (ruby 2.3.0-p0), codename: Owl Bowl Brawl
2017-02-24T20:57:31.229716+00:00 app[web.1]: * Environment: production
2017-02-24T20:57:31.229813+00:00 app[web.1]: * Listening on tcp://0.0.0.0:44473
2017-02-24T20:57:31.230029+00:00 app[web.1]: Use Ctrl-C to stop
2017-02-24T20:57:31.421917+00:00 heroku[web.1]: State changed from starting to up
2017-02-24T20:57:32.788592+00:00 heroku[router]: at=info method=GET path="/" host=infinite-forest-28304.herokuapp.com request_id=dedd394a-498a-464d-a669-ed19fa2fd418 fwd="188.83.235.112" dyno=web.1 connect=0ms service=58ms status=200 bytes=2753
2017-02-24T20:57:32.737531+00:00 app[web.1]: I, [2017-02-24T20:57:32.737424 #4]  INFO -- : [dedd394a-498a-464d-a669-ed19fa2fd418] Started GET "/" for 188.83.235.112 at 2017-02-24 20:57:32 +0000
2017-02-24T20:57:32.740219+00:00 app[web.1]: I, [2017-02-24T20:57:32.740152 #4]  INFO -- : [dedd394a-498a-464d-a669-ed19fa2fd418] Processing by PagesController#home as HTML
2017-02-24T20:57:32.752357+00:00 app[web.1]: I, [2017-02-24T20:57:32.752273 #4]  INFO -- : [dedd394a-498a-464d-a669-ed19fa2fd418]   Rendering pages/home.html.erb within layouts/application
2017-02-24T20:57:32.753153+00:00 app[web.1]: I, [2017-02-24T20:57:32.753082 #4]  INFO -- : [dedd394a-498a-464d-a669-ed19fa2fd418]   Rendered pages/home.html.erb within layouts/application (0.6ms)
2017-02-24T20:57:32.759595+00:00 app[web.1]: I, [2017-02-24T20:57:32.759524 #4]  INFO -- : [dedd394a-498a-464d-a669-ed19fa2fd418] Completed 200 OK in 19ms (Views: 8.6ms | ActiveRecord: 0.0ms)
2017-02-24T20:57:32.929609+00:00 heroku[router]: at=info method=GET path="/assets/application-95163fa38446d1bb6139f870d5fb932af7fa47b347b8951923c32a4565386aa6.js" host=infinite-forest-28304.herokuapp.com request_id=80d55a95-cbe8-4982-a571-bc8850567a87 fwd="188.83.235.112" dyno=web.1 connect=0ms service=1ms status=304 bytes=48
2017-02-24T20:57:32.928158+00:00 heroku[router]: at=info method=GET path="/assets/application-5ed627eba0abe94ba4e2c255c2298f55d9bca9b4ea45ded59ba1705edc5385d0.css" host=infinite-forest-28304.herokuapp.com request_id=a9c456f3-e7cd-4d6a-865f-2c8f5efbdaa7 fwd="188.83.235.112" dyno=web.1 connect=0ms service=1ms status=304 bytes=48
2017-02-24T20:57:33.143930+00:00 heroku[router]: at=info method=GET path="/assets/font-awesome/fontawesome-webfont-2932abf996373e87fbf2e950876b1962f1b57db954a1643ea68831d9fbb74da4.woff2?v=4.6.2" host=infinite-forest-28304.herokuapp.com request_id=90d78563-eaa6-4f24-a054-5c89beada59c fwd="188.83.235.112" dyno=web.1 connect=3ms service=1ms status=304 bytes=48
2017-02-24T20:57:33.402193+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=infinite-forest-28304.herokuapp.com request_id=7c20311c-bd5a-46c3-a9d5-c6266c1f9331 fwd="188.83.235.112" dyno=web.1 connect=0ms service=1ms status=304 bytes=48
2017-02-24T20:57:50.706814+00:00 heroku[router]: at=info method=GET path="/contact-us" host=infinite-forest-28304.herokuapp.com request_id=0ec752b1-0d75-42dd-83f6-ecd127086bfb fwd="188.83.235.112" dyno=web.1 connect=0ms service=35ms status=200 bytes=4317
2017-02-24T20:57:50.651067+00:00 app[web.1]: I, [2017-02-24T20:57:50.650984 #4]  INFO -- : [0ec752b1-0d75-42dd-83f6-ecd127086bfb] Started GET "/contact-us" for 188.83.235.112 at 2017-02-24 20:57:50 +0000
2017-02-24T20:57:50.652579+00:00 app[web.1]: I, [2017-02-24T20:57:50.652518 #4]  INFO -- : [0ec752b1-0d75-42dd-83f6-ecd127086bfb] Processing by ContactsController#new as HTML
2017-02-24T20:57:50.669618+00:00 app[web.1]: I, [2017-02-24T20:57:50.669536 #4]  INFO -- : [0ec752b1-0d75-42dd-83f6-ecd127086bfb]   Rendering contacts/new.html.erb within layouts/application
2017-02-24T20:57:50.681558+00:00 app[web.1]: I, [2017-02-24T20:57:50.681481 #4]  INFO -- : [0ec752b1-0d75-42dd-83f6-ecd127086bfb]   Rendered contacts/new.html.erb within layouts/application (11.8ms)
2017-02-24T20:57:50.682909+00:00 app[web.1]: I, [2017-02-24T20:57:50.682846 #4]  INFO -- : [0ec752b1-0d75-42dd-83f6-ecd127086bfb] Completed 200 OK in 30ms (Views: 14.0ms | ActiveRecord: 7.5ms)
2017-02-24T20:59:14.426470+00:00 app[web.1]: I, [2017-02-24T20:59:14.426395 #4]  INFO -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] Started POST "/contacts" for 188.83.235.112 at 2017-02-24 20:59:14 +0000
2017-02-24T20:59:14.427281+00:00 app[web.1]: I, [2017-02-24T20:59:14.427232 #4]  INFO -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] Processing by ContactsController#create as HTML
2017-02-24T20:59:14.427366+00:00 app[web.1]: I, [2017-02-24T20:59:14.427324 #4]  INFO -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6]   Parameters: {"utf8"=>"✓", "authenticity_token"=>"MgrtXM/8aUAYPnJ2ph4eIbsqMbLR/xXMZabcKmKh4myMlp0MdLJ2dCHnh7KshXSCqAsIzGQr0SdebpJw1v0QHw==", "contact"=>{"name"=>"Jesse Pinkman", "email"=>"jp@example.com", "comments"=>"Yo Beach!"}, "commit"=>"Submit"}
2017-02-24T20:59:14.429694+00:00 app[web.1]: D, [2017-02-24T20:59:14.429641 #4] DEBUG -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6]    (0.9ms)  BEGIN
2017-02-24T20:59:14.434537+00:00 app[web.1]: D, [2017-02-24T20:59:14.434485 #4] DEBUG -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6]   SQL (1.3ms)  INSERT INTO "contacts" ("name", "email", "comments", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"  [["name", "Jesse Pinkman"], ["email", "jp@example.com"], ["comments", "Yo Beach!"], ["created_at", 2017-02-24 20:59:14 UTC], ["updated_at", 2017-02-24 20:59:14 UTC]]
2017-02-24T20:59:14.436712+00:00 app[web.1]: D, [2017-02-24T20:59:14.436665 #4] DEBUG -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6]    (1.9ms)  COMMIT
2017-02-24T20:59:14.441776+00:00 app[web.1]: I, [2017-02-24T20:59:14.441724 #4]  INFO -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6]   Rendering contact_mailer/contact_email.html.erb
2017-02-24T20:59:14.442284+00:00 app[web.1]: I, [2017-02-24T20:59:14.442237 #4]  INFO -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6]   Rendered contact_mailer/contact_email.html.erb (0.4ms)
2017-02-24T20:59:14.622612+00:00 app[web.1]: D, [2017-02-24T20:59:14.622518 #4] DEBUG -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] ContactMailer#contact_email: processed outbound mail in 184.5ms
2017-02-24T20:59:14.749027+00:00 heroku[router]: at=info method=POST path="/contacts" host=infinite-forest-28304.herokuapp.com request_id=606794a4-3f9b-417c-b3ca-72af4d8bafb6 fwd="188.83.235.112" dyno=web.1 connect=0ms service=304ms status=500 bytes=1669
2017-02-24T20:59:14.722589+00:00 app[web.1]: I, [2017-02-24T20:59:14.722491 #4]  INFO -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] Sent mail to samuelslmoreira@hotmail.com (99.8ms)
2017-02-24T20:59:14.722632+00:00 app[web.1]: D, [2017-02-24T20:59:14.722588 #4] DEBUG -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] Date: Fri, 24 Feb 2017 20:59:14 +0000
2017-02-24T20:59:14.722632+00:00 app[web.1]: From: jp@example.com
2017-02-24T20:59:14.722633+00:00 app[web.1]: To: samuelslmoreira@hotmail.com
2017-02-24T20:59:14.722633+00:00 app[web.1]: Message-ID: <58b09ea298a14_43fc0c75eb9c0103ae@71798652-2827-4935-9282-6b3ae7c47b44.mail>
2017-02-24T20:59:14.722634+00:00 app[web.1]: Subject: Contact Form Message
2017-02-24T20:59:14.722634+00:00 app[web.1]: Mime-Version: 1.0
2017-02-24T20:59:14.722635+00:00 app[web.1]: Content-Type: text/html;
2017-02-24T20:59:14.722635+00:00 app[web.1]:  charset=UTF-8
2017-02-24T20:59:14.722635+00:00 app[web.1]: Content-Transfer-Encoding: 7bit
2017-02-24T20:59:14.722636+00:00 app[web.1]:
2017-02-24T20:59:14.722636+00:00 app[web.1]: <!DOCTYPE html>
2017-02-24T20:59:14.722637+00:00 app[web.1]: <html>
2017-02-24T20:59:14.722637+00:00 app[web.1]:     <head>
2017-02-24T20:59:14.722637+00:00 app[web.1]:     </head>
2017-02-24T20:59:14.722638+00:00 app[web.1]:     <body>
2017-02-24T20:59:14.722638+00:00 app[web.1]:         <p>
2017-02-24T20:59:14.722638+00:00 app[web.1]:             You have received a message from the site's contact form, from Jesse Pinkman, jp@example.com.
2017-02-24T20:59:14.722639+00:00 app[web.1]:         </p>
2017-02-24T20:59:14.722639+00:00 app[web.1]:         <p>
2017-02-24T20:59:14.722639+00:00 app[web.1]:
2017-02-24T20:59:14.722640+00:00 app[web.1]:         </p>
2017-02-24T20:59:14.722640+00:00 app[web.1]:     </body>
2017-02-24T20:59:14.722640+00:00 app[web.1]: </html>
2017-02-24T20:59:14.722825+00:00 app[web.1]: I, [2017-02-24T20:59:14.722779 #4]  INFO -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] Completed 500 Internal Server Error in 295ms (ActiveRecord: 4.1ms)
2017-02-24T20:59:14.723286+00:00 app[web.1]: F, [2017-02-24T20:59:14.723242 #4] FATAL -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6]
2017-02-24T20:59:14.723324+00:00 app[web.1]: F, [2017-02-24T20:59:14.723287 #4] FATAL -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] Net::SMTPFatalError (554 Please activate your Mailgun account. Check your inbox or log in to your control panel to resend the activation email.
2017-02-24T20:59:14.723325+00:00 app[web.1]: ):
2017-02-24T20:59:14.723357+00:00 app[web.1]: F, [2017-02-24T20:59:14.723324 #4] FATAL -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6]
2017-02-24T20:59:14.723390+00:00 app[web.1]: F, [2017-02-24T20:59:14.723357 #4] FATAL -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] app/controllers/contacts_controller.rb:15:in `create'
iamsamuel:~/workspace/saasapp (master) $ clear
iamsamuel:~/workspace/saasapp (master) $ clear
iamsamuel:~/workspace/saasapp (master) $ heroku logs
2017-02-24T20:18:19.316723+00:00 app[web.1]:             You have received a message from the site's contact form, from Sam, smlmrr@outlook.com.
2017-02-24T20:18:19.316724+00:00 app[web.1]:         </p>
2017-02-24T20:18:19.316724+00:00 app[web.1]:         <p>
2017-02-24T20:18:19.316725+00:00 app[web.1]:             
2017-02-24T20:18:19.316725+00:00 app[web.1]:         </p>
2017-02-24T20:18:19.316726+00:00 app[web.1]:     </body>
2017-02-24T20:18:19.316726+00:00 app[web.1]: </html>
2017-02-24T20:18:19.316886+00:00 app[web.1]: I, [2017-02-24T20:18:19.316838 #4]  INFO -- : [f024cbfb-df8b-4efa-8cb1-50a6a0d7881c] Completed 500 Internal Server Error in 1166ms (ActiveRecord: 4.1ms)
2017-02-24T20:18:19.317316+00:00 app[web.1]: F, [2017-02-24T20:18:19.317273 #4] FATAL -- : [f024cbfb-df8b-4efa-8cb1-50a6a0d7881c]   
2017-02-24T20:18:19.317357+00:00 app[web.1]: F, [2017-02-24T20:18:19.317318 #4] FATAL -- : [f024cbfb-df8b-4efa-8cb1-50a6a0d7881c] Net::SMTPFatalError (554 Please activate your Mailgun account. Check your inbox or log in to your control panel to resend the activation email.
2017-02-24T20:18:19.317358+00:00 app[web.1]: ):
2017-02-24T20:18:19.317396+00:00 app[web.1]: F, [2017-02-24T20:18:19.317355 #4] FATAL -- : [f024cbfb-df8b-4efa-8cb1-50a6a0d7881c]   
2017-02-24T20:18:19.317435+00:00 app[web.1]: F, [2017-02-24T20:18:19.317396 #4] FATAL -- : [f024cbfb-df8b-4efa-8cb1-50a6a0d7881c] app/controllers/contacts_controller.rb:15:in `create'
2017-02-24T20:18:19.520898+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=infinite-forest-28304.herokuapp.com request_id=62153ff0-bef7-4e44-958b-447fb18e7c23 fwd="188.83.235.112" dyno=web.1 connect=0ms service=1ms status=304 bytes=48
2017-02-24T20:53:16.169251+00:00 heroku[web.1]: Idling
2017-02-24T20:53:16.169901+00:00 heroku[web.1]: State changed from up to down
2017-02-24T20:53:17.034264+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2017-02-24T20:53:17.078764+00:00 app[web.1]: - Gracefully stopping, waiting for requests to finish
2017-02-24T20:53:17.078952+00:00 app[web.1]: === puma shutdown: 2017-02-24 20:53:17 +0000 ===
2017-02-24T20:53:17.078957+00:00 app[web.1]: - Goodbye!
2017-02-24T20:53:17.079100+00:00 app[web.1]: Exiting
2017-02-24T20:53:17.347515+00:00 heroku[web.1]: Process exited with status 0
2017-02-24T20:57:24.680979+00:00 heroku[web.1]: Unidling
2017-02-24T20:57:24.681258+00:00 heroku[web.1]: State changed from down to starting
2017-02-24T20:57:27.221989+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 44473 -e production`
2017-02-24T20:57:30.299354+00:00 app[web.1]: => Booting Puma
2017-02-24T20:57:30.299447+00:00 app[web.1]: => Rails 5.0.0 application starting in production on http://0.0.0.0:44473
2017-02-24T20:57:30.299502+00:00 app[web.1]: => Run `rails server -h` for more startup options
2017-02-24T20:57:31.229688+00:00 app[web.1]: Puma starting in single mode...
2017-02-24T20:57:31.229714+00:00 app[web.1]: * Min threads: 5, max threads: 5
2017-02-24T20:57:31.229713+00:00 app[web.1]: * Version 3.4.0 (ruby 2.3.0-p0), codename: Owl Bowl Brawl
2017-02-24T20:57:31.229716+00:00 app[web.1]: * Environment: production
2017-02-24T20:57:31.229813+00:00 app[web.1]: * Listening on tcp://0.0.0.0:44473
2017-02-24T20:57:31.230029+00:00 app[web.1]: Use Ctrl-C to stop
2017-02-24T20:57:31.421917+00:00 heroku[web.1]: State changed from starting to up
2017-02-24T20:57:32.788592+00:00 heroku[router]: at=info method=GET path="/" host=infinite-forest-28304.herokuapp.com request_id=dedd394a-498a-464d-a669-ed19fa2fd418 fwd="188.83.235.112" dyno=web.1 connect=0ms service=58ms status=200 bytes=2753
2017-02-24T20:57:32.737531+00:00 app[web.1]: I, [2017-02-24T20:57:32.737424 #4]  INFO -- : [dedd394a-498a-464d-a669-ed19fa2fd418] Started GET "/" for 188.83.235.112 at 2017-02-24 20:57:32 +0000
2017-02-24T20:57:32.740219+00:00 app[web.1]: I, [2017-02-24T20:57:32.740152 #4]  INFO -- : [dedd394a-498a-464d-a669-ed19fa2fd418] Processing by PagesController#home as HTML
2017-02-24T20:57:32.752357+00:00 app[web.1]: I, [2017-02-24T20:57:32.752273 #4]  INFO -- : [dedd394a-498a-464d-a669-ed19fa2fd418]   Rendering pages/home.html.erb within layouts/application
2017-02-24T20:57:32.753153+00:00 app[web.1]: I, [2017-02-24T20:57:32.753082 #4]  INFO -- : [dedd394a-498a-464d-a669-ed19fa2fd418]   Rendered pages/home.html.erb within layouts/application (0.6ms)
2017-02-24T20:57:32.759595+00:00 app[web.1]: I, [2017-02-24T20:57:32.759524 #4]  INFO -- : [dedd394a-498a-464d-a669-ed19fa2fd418] Completed 200 OK in 19ms (Views: 8.6ms | ActiveRecord: 0.0ms)
2017-02-24T20:57:32.929609+00:00 heroku[router]: at=info method=GET path="/assets/application-95163fa38446d1bb6139f870d5fb932af7fa47b347b8951923c32a4565386aa6.js" host=infinite-forest-28304.herokuapp.com request_id=80d55a95-cbe8-4982-a571-bc8850567a87 fwd="188.83.235.112" dyno=web.1 connect=0ms service=1ms status=304 bytes=48
2017-02-24T20:57:32.928158+00:00 heroku[router]: at=info method=GET path="/assets/application-5ed627eba0abe94ba4e2c255c2298f55d9bca9b4ea45ded59ba1705edc5385d0.css" host=infinite-forest-28304.herokuapp.com request_id=a9c456f3-e7cd-4d6a-865f-2c8f5efbdaa7 fwd="188.83.235.112" dyno=web.1 connect=0ms service=1ms status=304 bytes=48
2017-02-24T20:57:33.143930+00:00 heroku[router]: at=info method=GET path="/assets/font-awesome/fontawesome-webfont-2932abf996373e87fbf2e950876b1962f1b57db954a1643ea68831d9fbb74da4.woff2?v=4.6.2" host=infinite-forest-28304.herokuapp.com request_id=90d78563-eaa6-4f24-a054-5c89beada59c fwd="188.83.235.112" dyno=web.1 connect=3ms service=1ms status=304 bytes=48
2017-02-24T20:57:33.402193+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=infinite-forest-28304.herokuapp.com request_id=7c20311c-bd5a-46c3-a9d5-c6266c1f9331 fwd="188.83.235.112" dyno=web.1 connect=0ms service=1ms status=304 bytes=48
2017-02-24T20:57:50.706814+00:00 heroku[router]: at=info method=GET path="/contact-us" host=infinite-forest-28304.herokuapp.com request_id=0ec752b1-0d75-42dd-83f6-ecd127086bfb fwd="188.83.235.112" dyno=web.1 connect=0ms service=35ms status=200 bytes=4317
2017-02-24T20:57:50.651067+00:00 app[web.1]: I, [2017-02-24T20:57:50.650984 #4]  INFO -- : [0ec752b1-0d75-42dd-83f6-ecd127086bfb] Started GET "/contact-us" for 188.83.235.112 at 2017-02-24 20:57:50 +0000
2017-02-24T20:57:50.652579+00:00 app[web.1]: I, [2017-02-24T20:57:50.652518 #4]  INFO -- : [0ec752b1-0d75-42dd-83f6-ecd127086bfb] Processing by ContactsController#new as HTML
2017-02-24T20:57:50.669618+00:00 app[web.1]: I, [2017-02-24T20:57:50.669536 #4]  INFO -- : [0ec752b1-0d75-42dd-83f6-ecd127086bfb]   Rendering contacts/new.html.erb within layouts/application
2017-02-24T20:57:50.681558+00:00 app[web.1]: I, [2017-02-24T20:57:50.681481 #4]  INFO -- : [0ec752b1-0d75-42dd-83f6-ecd127086bfb]   Rendered contacts/new.html.erb within layouts/application (11.8ms)
2017-02-24T20:57:50.682909+00:00 app[web.1]: I, [2017-02-24T20:57:50.682846 #4]  INFO -- : [0ec752b1-0d75-42dd-83f6-ecd127086bfb] Completed 200 OK in 30ms (Views: 14.0ms | ActiveRecord: 7.5ms)
2017-02-24T20:59:14.426470+00:00 app[web.1]: I, [2017-02-24T20:59:14.426395 #4]  INFO -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] Started POST "/contacts" for 188.83.235.112 at 2017-02-24 20:59:14 +0000
2017-02-24T20:59:14.427281+00:00 app[web.1]: I, [2017-02-24T20:59:14.427232 #4]  INFO -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] Processing by ContactsController#create as HTML
2017-02-24T20:59:14.427366+00:00 app[web.1]: I, [2017-02-24T20:59:14.427324 #4]  INFO -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6]   Parameters: {"utf8"=>"✓", "authenticity_token"=>"MgrtXM/8aUAYPnJ2ph4eIbsqMbLR/xXMZabcKmKh4myMlp0MdLJ2dCHnh7KshXSCqAsIzGQr0SdebpJw1v0QHw==", "contact"=>{"name"=>"Jesse Pinkman", "email"=>"jp@example.com", "comments"=>"Yo Beach!"}, "commit"=>"Submit"}
2017-02-24T20:59:14.429694+00:00 app[web.1]: D, [2017-02-24T20:59:14.429641 #4] DEBUG -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6]    (0.9ms)  BEGIN
2017-02-24T20:59:14.434537+00:00 app[web.1]: D, [2017-02-24T20:59:14.434485 #4] DEBUG -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6]   SQL (1.3ms)  INSERT INTO "contacts" ("name", "email", "comments", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"  [["name", "Jesse Pinkman"], ["email", "jp@example.com"], ["comments", "Yo Beach!"], ["created_at", 2017-02-24 20:59:14 UTC], ["updated_at", 2017-02-24 20:59:14 UTC]]
2017-02-24T20:59:14.436712+00:00 app[web.1]: D, [2017-02-24T20:59:14.436665 #4] DEBUG -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6]    (1.9ms)  COMMIT
2017-02-24T20:59:14.441776+00:00 app[web.1]: I, [2017-02-24T20:59:14.441724 #4]  INFO -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6]   Rendering contact_mailer/contact_email.html.erb
2017-02-24T20:59:14.442284+00:00 app[web.1]: I, [2017-02-24T20:59:14.442237 #4]  INFO -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6]   Rendered contact_mailer/contact_email.html.erb (0.4ms)
2017-02-24T20:59:14.622612+00:00 app[web.1]: D, [2017-02-24T20:59:14.622518 #4] DEBUG -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] ContactMailer#contact_email: processed outbound mail in 184.5ms
2017-02-24T20:59:14.749027+00:00 heroku[router]: at=info method=POST path="/contacts" host=infinite-forest-28304.herokuapp.com request_id=606794a4-3f9b-417c-b3ca-72af4d8bafb6 fwd="188.83.235.112" dyno=web.1 connect=0ms service=304ms status=500 bytes=1669
2017-02-24T20:59:14.722589+00:00 app[web.1]: I, [2017-02-24T20:59:14.722491 #4]  INFO -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] Sent mail to samuelslmoreira@hotmail.com (99.8ms)
2017-02-24T20:59:14.722632+00:00 app[web.1]: D, [2017-02-24T20:59:14.722588 #4] DEBUG -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] Date: Fri, 24 Feb 2017 20:59:14 +0000
2017-02-24T20:59:14.722632+00:00 app[web.1]: From: jp@example.com
2017-02-24T20:59:14.722633+00:00 app[web.1]: To: samuelslmoreira@hotmail.com
2017-02-24T20:59:14.722633+00:00 app[web.1]: Message-ID: <58b09ea298a14_43fc0c75eb9c0103ae@71798652-2827-4935-9282-6b3ae7c47b44.mail>
2017-02-24T20:59:14.722634+00:00 app[web.1]: Subject: Contact Form Message
2017-02-24T20:59:14.722634+00:00 app[web.1]: Mime-Version: 1.0
2017-02-24T20:59:14.722635+00:00 app[web.1]: Content-Type: text/html;
2017-02-24T20:59:14.722635+00:00 app[web.1]:  charset=UTF-8
2017-02-24T20:59:14.722635+00:00 app[web.1]: Content-Transfer-Encoding: 7bit
2017-02-24T20:59:14.722636+00:00 app[web.1]: 
2017-02-24T20:59:14.722636+00:00 app[web.1]: <!DOCTYPE html>
2017-02-24T20:59:14.722637+00:00 app[web.1]: <html>
2017-02-24T20:59:14.722637+00:00 app[web.1]:     <head>
2017-02-24T20:59:14.722637+00:00 app[web.1]:     </head>
2017-02-24T20:59:14.722638+00:00 app[web.1]:     <body>
2017-02-24T20:59:14.722638+00:00 app[web.1]:         <p>
2017-02-24T20:59:14.722638+00:00 app[web.1]:             You have received a message from the site's contact form, from Jesse Pinkman, jp@example.com.
2017-02-24T20:59:14.722639+00:00 app[web.1]:         </p>
2017-02-24T20:59:14.722639+00:00 app[web.1]:         <p>
2017-02-24T20:59:14.722639+00:00 app[web.1]:             
2017-02-24T20:59:14.722640+00:00 app[web.1]:         </p>
2017-02-24T20:59:14.722640+00:00 app[web.1]:     </body>
2017-02-24T20:59:14.722640+00:00 app[web.1]: </html>
2017-02-24T20:59:14.722825+00:00 app[web.1]: I, [2017-02-24T20:59:14.722779 #4]  INFO -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] Completed 500 Internal Server Error in 295ms (ActiveRecord: 4.1ms)
2017-02-24T20:59:14.723286+00:00 app[web.1]: F, [2017-02-24T20:59:14.723242 #4] FATAL -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6]   
2017-02-24T20:59:14.723324+00:00 app[web.1]: F, [2017-02-24T20:59:14.723287 #4] FATAL -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] Net::SMTPFatalError (554 Please activate your Mailgun account. Check your inbox or log in to your control panel to resend the activation email.
2017-02-24T20:59:14.723325+00:00 app[web.1]: ):
2017-02-24T20:59:14.723357+00:00 app[web.1]: F, [2017-02-24T20:59:14.723324 #4] FATAL -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6]   
2017-02-24T20:59:14.723390+00:00 app[web.1]: F, [2017-02-24T20:59:14.723357 #4] FATAL -- : [606794a4-3f9b-417c-b3ca-72af4d8bafb6] app/controllers/contacts_controller.rb:15:in `create'
2017-02-24T21:30:27.890702+00:00 heroku[router]: at=info method=GET path="/" host=infinite-forest-28304.herokuapp.com request_id=ef1e2185-e94e-4a90-907e-15dad519fd59 fwd="188.83.235.112" dyno=web.1 connect=1ms service=6ms status=200 bytes=2753
2017-02-24T21:30:27.866291+00:00 app[web.1]: I, [2017-02-24T21:30:27.866202 #4]  INFO -- : [ef1e2185-e94e-4a90-907e-15dad519fd59] Started GET "/" for 188.83.235.112 at 2017-02-24 21:30:27 +0000
2017-02-24T21:30:27.867090+00:00 app[web.1]: I, [2017-02-24T21:30:27.867030 #4]  INFO -- : [ef1e2185-e94e-4a90-907e-15dad519fd59] Processing by PagesController#home as HTML
2017-02-24T21:30:27.868034+00:00 app[web.1]: I, [2017-02-24T21:30:27.867962 #4]  INFO -- : [ef1e2185-e94e-4a90-907e-15dad519fd59]   Rendering pages/home.html.erb within layouts/application
2017-02-24T21:30:27.868172+00:00 app[web.1]: I, [2017-02-24T21:30:27.868117 #4]  INFO -- : [ef1e2185-e94e-4a90-907e-15dad519fd59]   Rendered pages/home.html.erb within layouts/application (0.0ms)
2017-02-24T21:30:27.869109+00:00 app[web.1]: I, [2017-02-24T21:30:27.869058 #4]  INFO -- : [ef1e2185-e94e-4a90-907e-15dad519fd59] Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.0ms)
2017-02-24T21:30:28.039850+00:00 heroku[router]: at=info method=GET path="/assets/application-5ed627eba0abe94ba4e2c255c2298f55d9bca9b4ea45ded59ba1705edc5385d0.css" host=infinite-forest-28304.herokuapp.com request_id=f9b48384-ae99-4f9e-b035-6624ef9d2ce6 fwd="188.83.235.112" dyno=web.1 connect=0ms service=1ms status=304 bytes=48
2017-02-24T21:30:28.051038+00:00 heroku[router]: at=info method=GET path="/assets/application-95163fa38446d1bb6139f870d5fb932af7fa47b347b8951923c32a4565386aa6.js" host=infinite-forest-28304.herokuapp.com request_id=7b1f62bf-5aca-4ac1-b926-5c3219b3ccac fwd="188.83.235.112" dyno=web.1 connect=1ms service=2ms status=304 bytes=48
2017-02-24T21:30:28.279062+00:00 heroku[router]: at=info method=GET path="/assets/font-awesome/fontawesome-webfont-2932abf996373e87fbf2e950876b1962f1b57db954a1643ea68831d9fbb74da4.woff2?v=4.6.2" host=infinite-forest-28304.herokuapp.com request_id=d1522ce1-c16b-4525-aa55-08c6f45713c8 fwd="188.83.235.112" dyno=web.1 connect=0ms service=1ms status=304 bytes=48
2017-02-24T21:30:29.186402+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=infinite-forest-28304.herokuapp.com request_id=1cec8754-06b9-4b20-ad32-77976a359e33 fwd="188.83.235.112" dyno=web.1 connect=0ms service=1ms status=304 bytes=48

4 个答案:

答案 0 :(得分:1)

阅读错误消息:

Net::SMTPFatalError (554 Please activate your Mailgun account. Check your inbox or log in to your control panel to resend the activation email.

只需激活您的帐户。

答案 1 :(得分:1)

确定。正如日志所说,并且@GrahamSlick已经回答,您的mailgun帐户未经过验证。如果您声明该帐户已经过验证,请确保您使用的凭据 您的 config / environment.rb 是属于已验证帐户的正确密码,并确保heroku使用正确的凭据。日志表明您的帐户未经过验证。可能是您想再次使用mailgun检查您的设置,看看他们是否告诉您有关非活动帐户的信息。祝好运。

答案 2 :(得分:1)

你必须添加一个域,验证它,然后你就可以从mailgun发送邮件。

答案 3 :(得分:0)

我遇到了完全相同的问题。我甚至尝试使用CURL来确保它与rails或heroku无关。我仔细检查了我的域名是否经过验证。

我最后开了一张支持票。他们在几个小时内回到我身边,然后说#34;现在好了,#34;确实有效。

因此,它们或者是他们的错误,或者他们故意要求对某些帐户进行人工监督。这不是一个很好的第一印象,但很高兴看到他们的支持迅速得到回应。