簡體   English   中英

Heroku環境中的Ruby on Rails應用程序:“使用Mailgun發送電子郵件”錯誤

[英]Ruby on Rails app on a Heroku environment: “Sending Email with Mailgun” error

我試圖測試從基於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

閱讀錯誤消息:

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

只需激活您的帳戶即可。

好。 如日志所述和@GrahamSlick已回答,您的mailgun帳戶未通過驗證。 如果您聲稱該帳戶已通過驗證,請確保在config / environment.rb中使用的憑據是屬於已驗證帳戶的正確憑據,並確保heroku使用正確的憑據。 日志顯示您的帳戶未通過驗證。 您可能想再次使用mailgun檢查設置,看看它們是否告訴您有關擁有無效帳戶的信息。 祝好運。

您必須添加一個域,對其進行驗證,然后才能從mailgun發送郵件。

我遇到了完全相同的問題。 我什至嘗試使用CURL來確保它與rails或heroku無關。 我再次檢查了我的域名是否已通過驗證。

我最終打開了一張支持票。 他們在幾個小時內回到了我身邊,並說“現在很好了”,並且肯定它可以正常工作。

因此,這要么是錯誤,要么是有目的地要求對某些帳戶進行人工監督。 這不是一個很好的第一印象,但是很高興看到他們的支持迅速做出了回應。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM