我正在Windows 7(64位)上使用ROR開發網站。我正在嘗試設置我的網站,以便在其上創建新登錄的人員收到確認電子郵件。我正在使用ActionMailer發送電子郵件確認。我正在嘗試將其配置爲使用Gmail SMTP服務器發送確認電子郵件。 (這僅僅是測試一旦它的作品,我可以用別的東西的部署服務器。)在ROR上使用ActionMailer發送電子郵件確認時出錯
我收到此錯誤:
Application-specific password required
下面是從development.rb代碼片段:
config.action_mailer.raise_delivery_errors = true
config.action_mailer.delivery_method = :smtp
# these options are only needed if you choose smtp delivery
config.action_mailer.smtp_settings = {
:address => 'smtp.gmail.com',
:port => 587,
:domain => 'gmail.com',
:authentication => :login,
:user_name => '[email protected]',
:password => 'my_application_specific_password'
}
爲什麼我得到這個錯誤,即使我爲此生成了一個新的應用程序專用密碼並且正在使用它?如何解決這個問題?
你的問題看起來很類似: http://stackoverflow.com/questions/10991932/sending-confirmation-emails-to-registered-users-in-ror-app-via-localhost/10994387#10994387 –