gitlab 邮件配置(smtp)

gitlab 邮件配置(smtp) 2015-07-29 15:21:45

分类: 开源技术

一:修改全局配置文件

$ 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

四:测试配置








  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值