Net :: SMTPAuthenticationError:534-5.7.14尽管访问应用程序的安全性较低

时间:2018-12-12 16:09:18

标签: smtp gitlab gitlab-omnibus

rb`配置。我在127.0.0.1:81上运行Gitlab,并想发送测试电子邮件

gitlab_rails['smtp_enable'] = true
 gitlab_rails['smtp_address'] = "smtp.gmail.com"
 gitlab_rails['smtp_port'] = 587
 gitlab_rails['smtp_user_name'] = "rafay.mir07@gmail.com"
 gitlab_rails['smtp_password'] = "****"
 gitlab_rails['smtp_domain'] = "localhost:81"
 gitlab_rails['smtp_authentication'] = "plain"
 gitlab_rails['smtp_tls'] = false
 gitlab_rails['gitlab_email_from'] = 'rafay.mir07@gmail.com'

问题:
即使我已授予访问我的gmail帐户中不安全的应用程序的权限,但我仍然不断收到此错误

Net::SMTPAuthenticationError: 534-5.7.14 <https://accounts.google.com/signin/continue?sarp=1&scc=1&plt=AKgnsbsP

    from /opt/gitlab/embedded/lib/ruby/2.4.0/net/smtp.rb:981:in `check_auth_response'
    from /opt/gitlab/embedded/lib/ruby/2.4.0/net/smtp.rb:736:in `auth_plain'
    from /opt/gitlab/embedded/lib/ruby/2.4.0/net/smtp.rb:728:in `authenticate'
    from /opt/gitlab/embedded/lib/ruby/2.4.0/net/smtp.rb:565:in `do_start'
    from /opt/gitlab/embedded/lib/ruby/2.4.0/net/smtp.rb:518:in `start'
    from /opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/mail-2.7.0/lib/mail/network/delivery_methods/smtp.rb:109:in `start_smtp_session'
    from /opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/mail-2.7.0/lib/mail/network/delivery_methods/smtp.rb:100:in `deliver!'
    from /opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/mail-2.7.0/lib/mail/message.rb:2160:in `do_delivery'
    from /opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/mail-2.7.0/lib/mail/message.rb:260:in `block in deliver'
    from /opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/actionmailer-4.2.10/lib/action_mailer/base.rb:543:in `block in deliver_mail'
    from /opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/activesupport-4.2.10/lib/active_support/notifications.rb:164:in `block in instrument'
    from /opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/activesupport-4.2.10/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
    from /opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/activesupport-4.2.10/lib/active_support/notifications.rb:164:in `instrument'
    from /opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/actionmailer-4.2.10/lib/action_mailer/base.rb:541:in `deliver_mail'
    from /opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/mail-2.7.0/lib/mail/message.rb:260:in `deliver'
    from /opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/actionmailer-4.2.10/lib/action_mailer/message_delivery.rb:85:in `deliver_now'
    from (irb):2
    from /opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/railties-4.2.10/lib/rails/commands/console.rb:110:in `start'
    from /opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/railties-4.2.10/lib/rails/commands/console.rb:9:in `start'
    from /opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/railties-4.2.10/lib/rails/commands/commands_tasks.rb:68:in `console'
    from /opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/railties-4.2.10/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
    from /opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/railties-4.2.10/lib/rails/commands.rb:17:in `<top (required)>'
    from bin/rails:14:in `require'
    from bin/rails:14:in `<main>'

问题:
我的邮件服务器配置是否正确?还是我做错了其他事情?

0 个答案:

没有答案