【问题标题】:Rails Zoho configuration sending mails via console but not from mailer classRails Zoho 配置通过控制台而不是从邮件程序类发送邮件
【发布时间】:2017-06-22 20:36:43
【问题描述】:

我的 development.rb 上有以下 smtp 配置

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

当我通过 rails 控制台发送时我工作,但给出了错误

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

当我通过邮件类发送时。

【问题讨论】:

标签: ruby-on-rails-3 actionmailer zoho


【解决方案1】:

当您尝试通过控制器访问时,似乎 gmail 暂时阻止了您。

请查看此链接

https://support.google.com/mail/answer/7126229?visit_id=1-636342470835359266-2568809045&rd=1#cantsignin

希望这会有所帮助。

【讨论】:

    猜你喜欢
    • 2013-09-10
    • 1970-01-01
    • 1970-01-01
    • 2013-08-22
    • 2014-10-08
    • 2011-03-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多