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
四:测试配置
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
四:测试配置
相关文章推荐
- php环境配置
- 解决thinkPHP3.2.3使用Smarty模板后无法使用系统常量问题
- 配置GitLab 用smtp发邮件 (gitlab-6.7.3)
- php学习笔记(三)select处理
- RHEL 6 TFTP
- PHP——php——zend studio 断点调试
- PHP进阶(一)——数组与函数
- yii 操作session
- PHP中的一些遗漏点
- Cookie for PHP
- PHP中如何设置error_reporting错误报告级别
- PHP环境搭建
- PHP基础入门(三)
- Codeforces Round #293 (Div. 2) C.Anya and Smartphone(模拟)
- php学习笔记(二)php与mysql连接与用php发送SQL查询
- php学习笔记(一)php模板与控制器
- php项目笔记(二)php部分
- php项目笔记(一)mysql准备
- laravel的启动过程
- PHP阶段总结