2017-06-22 55 views
0

我已在development.rb以下SMTP配置Rails的Zoho的配置通過發送郵件主機而不是從郵件類

ActionMailer::Base.delivery_method = :smtp 
     ActionMailer::Base.smtp_settings = { 
     :address    => "smtp.zoho.com", 
     :port     => 465, 
     :user_name => "[email protected]", 
     :password => "xxxx", 
     :authentication  => :login, 
     :ssl     => true, 
     :tls     => true, 
     :enable_starttls_auto => true 
     } 

我的作品時,我通過導軌控制檯發送,但給人的

Net::SMTPAuthenticationError (535-5.7.8 Username and Password not accepted. Learn more at 
): 
錯誤

當我通過郵件發送類。

+0

請閱讀[在什麼情況下,我可以添加「緊急」或其他類似的短語到我的問題,以獲得更快的答案?](/ meta.stackoverflow.com/q/326569) - 摘要是,這不是解決志願者問題的理想方式,而且可能對獲得答案起反作用。請不要將這添加到您的問題。 – halfer

回答