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

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

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    gitlab设置阿里企业邮箱smtp服务器时,测试时报错,改了N也不行
    44
    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
    更多回答
    扫一扫访问手机版

    回答动态

    师傅被妖怪抓走了:发布了悬赏问题火爆全网的“元宇宙”到底是什么?预计能赚取 1积分收益
    酒后略带风情:发布了悬赏问题Android内存中Graphics与Code占用过高预计能赚取 10积分收益
    扛起拖把扫天下:发布了悬赏问题typescript如何导出接口配置?求解,谢谢!预计能赚取 10积分收益
    发布了悬赏问题Vue 如何改变返回页面的路径?如让B页面只能返回到A页面.预计能赚取 11积分收益
    发布了悬赏问题vue H5移动端;底部bottom固定定位,安卓弹起键盘导致页面变形如何解决?预计能赚取 10积分收益
    发布了悬赏问题请问为什么tomcat8.5 GET请求中文正常,POST请求还需要设置UTF-8.预计能赚取 10积分收益
    发布了悬赏问题vue2.5+ts创建以及引入jq的方法预计能赚取 11积分收益
    情场浪女:发布了悬赏问题import ggplot时报错module 'pandas' has no attribute 'tslib'预计能赚取 10积分收益
    见心书画许老师18753375161:发布了悬赏问题echarts3 legend禁止点击事件,允许悬浮事件预计能赚取 11积分收益
    aa_92cb0bd09f:发布了悬赏问题codewar上的一个问题预计能赚取 11积分收益