ITPub博客

首页 > 应用开发 > IT综合 > gitlab 邮件配置(smtp)

gitlab 邮件配置(smtp)

原创 IT综合 作者:百联达 时间:2015-07-29 15:21:45 0 删除 编辑
一:修改全局配置文件

$ git config --GLOBAL user.name "gengchong"
$ git config --GLOBAL user.email "gengchong@ddcehua.com"


二:配置gitlab的发送邮件的SMTP服务

修改gitlab/config/environments/production.rb配置文件:

config.action_mailer.delivery_method= :smtp

更改smtp邮件配置文件gitlab/config/initializers/smtp_settings.rb:

if Rails.env.production?
  Gitlab::Application.config.action_mailer.delivery_method = :smtp
  ActionMailer::Base.smtp_settings = {
    address: "smtp.exmail.qq.com",
    port: 25,
    user_name: "gengchong@ddcehua.com",
    password: "email password",
    domain: "smtp.qq.com",
    authentication: :login,
    enable_starttls_auto: false,
    openssl_verify_mode: 'none' # See ActionMailer documentation for other possible options
  }
end

这里,端口使用的是25,不是腾讯企业邮箱官方说的465,请注意.

三:重启gitlab
service gitlab restart

四:测试配置










来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/28624388/viewspace-1755425/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: Linux GitLab安装
请登录后发表评论 登录
全部评论
15年以上互联网经验,先后从事过制造业,证券业,物业行业和物流行业信息系统和互联网产品的设计落地实施,8年系统架构经验。最近关注企业数字化转型、财务数字化服务共享、大语言模型、Kubernetes微服务架构和Istio微服务治理框架。

注册时间:2013-02-05

  • 博文量
    332
  • 访问量
    1265623