账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    gitlab设置阿里企业邮箱smtp服务器时,测试时报错,改了N也不行
    107
    0

    Gitlab 设置 阿里企业 测试发送时报错

    配置

    gitlab_rails['smtp_enable'] = true
    gitlab_rails['smtp_address'] = "smtp.mxhichina.com"
    gitlab_rails['smtp_port'] = 25//465也试过
    gitlab_rails['smtp_user_name'] = "gitlab@gwoole.com"
    gitlab_rails['smtp_password'] = "xxxxxx"
    gitlab_rails['smtp_domain'] = "smtp.mxhichina.com"
    gitlab_rails['smtp_authentication'] = "login"//"plain"都试过
    gitlab_rails['smtp_enable_starttls_auto'] = true

    结果

    [root@izuf690jwvj8z9113kwd4oz ~]# gitlab-rails console
    Loading production environment (Rails 4.2.10)
    irb(main):001:0> Notify.test_email('chenzhi@meishubao.com', 'Message Subject', 'Message Body').deliver_now
    
    Notify#test_email: processed outbound mail in 302.9ms
    
    Sent mail to chenzhi@meishubao.com (30013.7ms)
    Date: Mon, 29 Jan 2018 19:59:04 +0800
    From: GitLab <gitlab@gitlab.gwoole.com>
    Reply-To: GitLab <noreply@gitlab.gwoole.com>
    To: chenzhi@meishubao.com
    Message-ID: <5a6f0c88819b9_68673f9e7ebdb10c52761@izuf690jwvj8z9113kwd4oz.mail>
    Subject: Message Subject
    Mime-Version: 1.0
    Content-Type: text/html;
     charset=UTF-8
    Content-Transfer-Encoding: 7bit
    Auto-Submitted: auto-generated
    X-Auto-Response-Suppress: All
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
    <html><body><p>Message Body</p></body></html>
    
    Net::OpenTimeout: execution expired
        from /opt/gitlab/embedded/lib/ruby/2.3.0/net/smtp.rb:542:in `initialize'
        from /opt/gitlab/embedded/lib/ruby/2.3.0/net/smtp.rb:542:in `open'
        from /opt/gitlab/embedded/lib/ruby/2.3.0/net/smtp.rb:542:in `tcp_socket'
        from /opt/gitlab/embedded/lib/ruby/2.3.0/net/smtp.rb:552:in `block in do_start'
        from /opt/gitlab/embedded/lib/ruby/2.3.0/timeout.rb:101:in `timeout'
        from /opt/gitlab/embedded/lib/ruby/2.3.0/net/smtp.rb:551:in `do_start'
        from /opt/gitlab/embedded/lib/ruby/2.3.0/net/smtp.rb:521:in `start'
        from /opt/gitlab/embedded/lib/ruby/gems/2.3.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.3.0/gems/mail-2.7.0/lib/mail/network/delivery_methods/smtp.rb:100:in `deliver!'
        from /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/mail-2.7.0/lib/mail/message.rb:2160:in `do_delivery'
        from /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/mail-2.7.0/lib/mail/message.rb:260:in `block in deliver'
        from /opt/gitlab/embedded/lib/ruby/gems/2.3.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.3.0/gems/activesupport-4.2.10/lib/active_support/notifications.rb:164:in `block in instrument'
        from /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
        from /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/notifications.rb:164:in `instrument'
        from /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/actionmailer-4.2.10/lib/action_mailer/base.rb:541:in `deliver_mail'
        from /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/mail-2.7.0/lib/mail/message.rb:260:in `deliver'
        from /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/actionmailer-4.2.10/lib/action_mailer/message_delivery.rb:85:in `deliver_now'
        from (irb):1
        from /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/railties-4.2.10/lib/rails/commands/console.rb:110:in `start'
        from /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/railties-4.2.10/lib/rails/commands/console.rb:9:in `start'
        from /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/railties-4.2.10/lib/rails/commands/commands_tasks.rb:68:in `console'
        from /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/railties-4.2.10/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
        from /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/railties-4.2.10/lib/rails/commands.rb:17:in `<top (required)>'
        from bin/rails:9:in `require'
        from bin/rails:9:in `<main>'
    irb(main):002:0>
    0
    打赏
    收藏
    点击回答
        全部回答
    • 0
    更多回答
    网站公告
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部