您的位置:首页 > 编程语言 > PHP开发

gitlab 邮件配置(smtp)

2016-07-25 23:43 453 查看
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

四:测试配置



内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: