Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/excel/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails Ruby on Rails,Net::SMTPauthenticationAPI::UsersController#create中出现错误_Ruby On Rails_Ruby On Rails 5 - Fatal编程技术网

Ruby on rails Ruby on Rails,Net::SMTPauthenticationAPI::UsersController#create中出现错误

Ruby on rails Ruby on Rails,Net::SMTPauthenticationAPI::UsersController#create中出现错误,ruby-on-rails,ruby-on-rails-5,Ruby On Rails,Ruby On Rails 5,我在控制台中遇到这个错误,类似于页面代码: ERROR Error: Uncaught (in promise): <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <title>Action Controller: Exception caught</title> <style> body { bac

我在控制台中遇到这个错误,类似于页面代码:

ERROR Error: Uncaught (in promise): <!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8" />
  <title>Action Controller: Exception caught</title>
  <style>
    body {
      background-color: #FAFAFA;
      color: #333;
      margin: 0px;
    }
......
即使在我对消息发送代码进行注释时,错误也不会崩溃,注册过程也不会出错,但不会发送任何消息,我认为这是合乎逻辑的

这是我们设法抓住的另一个错误:

Net::SMTPAuthenticationError in Api::UsersController#create
534-5.7.14 <https://accounts.google.com/signin/continue?sarp=1&scc=1&plt=AKgnsbsn


21    if @user.save
22      origin = request.headers['origin']
23      ApplicationMailer.registration_confirmation(@user, origin).deliver
24      render :show, status: :ok
25    else
26      render json: {
Api::UsersController#create中的
Net::SMTPAuthenticationError

534-5.7.14尝试用
替换
身份验证:
:普通
:登录
,或/和取消注释
启用\u starttls\u auto:true
,因为您在端口587()上,我尝试了您的各种建议组合,但它们对我没有帮助,我仍然找不到解决问题的方法。因此,因为它引发了SMTPAuthenticationError,可能您的登录信息无效或您的google帐户配置(例如启用了2因素身份验证)。。。您可以尝试使用另一个SMTP(mailtrap.io、sendgrid等)吗?是的,这是我的错误,我包含了主邮件,我允许访问,但我必须允许它访问完全不同的帐户。谢谢
Net::SMTPAuthenticationError in Api::UsersController#create
534-5.7.14 <https://accounts.google.com/signin/continue?sarp=1&scc=1&plt=AKgnsbsn


21    if @user.save
22      origin = request.headers['origin']
23      ApplicationMailer.registration_confirmation(@user, origin).deliver
24      render :show, status: :ok
25    else
26      render json: {