且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Rails:Net :: SMTPAuthenticationError(535身份验证失败:用户名/密码错误)

更新时间:2022-05-05 07:57:10

邮件中有错字:

class ExampleMailer < ActionMailer::Base
  default from: "myemail@gmail.com"
  def sample_email(user)
    @user = user
    mail(to: @user.email, subject: 'sample email')
  end
end

在您的 production.rb ,您可以将用户名写为 myemail 。没关系。

And in your production.rb, you can write username as myemail. That's fine.

让我知道它是否无效。

Let me know if its not work..