为什么我收到500错误?我无法在开发中成功收到发送到我的Gmail帐户的电子邮件 这是我的服务器日志中的内容:
tarted POST "/contacts" for ::1 at 2015-04-06 12:23:42 -0500
Processing by ContactsController#create as */*
Parameters: {"utf8"=>"✓","authenticity_token"=>"2rAtjm6kGBtqrHwLM1oCdrjzJUhYuSR2eX+/4fJpgcCF2TvDs+jKtOPgXmSPOV/eQ9eIRlftynyB6VZKqHw4Ew==", "contact"=>{"name"=>"ahdiwhfjfhew", "email"=>"iahfiwhef@yahoo.com", "message"=>"kfbjwefawjbfjwbeakfekwjfjk3fwoefowqou"}, "commit"=>"Send Message"}
DEPRECATION WARNING: `#deliver` is deprecated and will be removed in Rails 5. Use `#deliver_now` to deliver immediately or `#deliver_later` to deliver through Active Job. (called from create at /Users/corneliusmurphy/spartan_strength_and_power/app/controllers/contacts_controller.rb:9)
Rendered /usr/local/lib/ruby/gems/2.2.0/gems/mail_form-1.5.0/lib/mail_form/views/mail_form/contact.erb (0.6ms)
MailForm::Notifier#contact: processed outbound mail in 83.5ms
Sent mail to neil.murphy0600@gmail.com (817.1ms)
Date: Mon, 06 Apr 2015 12:23:42 -0500
From: ahdiwhfjfhew <iahfiwhef@yahoo.com>
To: neil.murphy0600@gmail.com
Message-ID: <5522c11eb5b6b_596c3fc77b83f2c055624@CorneliussMBP3.mail>
Subject: My Contact Form
Mime-Version: 1.0
Content-Type: text/html;
charset=UTF-8
Content-Transfer-Encoding: 7bit
<h4 style="text-decoration:underline">My Contact Form</h4>
<p><b>Name:</b>
ahdiwhfjfhew</p>
<p><b>Email:</b>
iahfiwhef@yahoo.com</p>
<p><b>Message:</b>
kfbjwefawjbfjwbeakfekwjfjk3fwoefowqou</p>
Completed 500 Internal Server Error in 902ms
Net::SMTPAuthenticationError (534-5.7.14 <https://accounts.google.com/ContinueSignIn?sarp=1&scc=1&plt=AKgnsbt4U):app/controllers/contacts_controller.rb:9:in `create'
答案 0 :(得分:0)
答案是因为Google存在Google安全功能问题,可以在Gmail中启用/禁用