gitlab配置邮件服务
QQ邮箱为例
gitlab_rails[‘smtp_enable‘] = true
gitlab_rails[‘smtp_address‘] = "smtp.qq.com"
gitlab_rails[‘smtp_port‘] = 465
gitlab_rails[‘smtp_user_name‘] = "18773930@qq.com"
gitlab_rails[‘smtp_password‘] = "QQ邮箱授权码(不是QQ邮箱的密码)"
gitlab_rails[‘smtp_domain‘] = "qq.com"
gitlab_rails[‘smtp_authentication‘] = "login"
gitlab_rails[‘smtp_enable_starttls_auto‘] = true
gitlab_rails[‘smtp_tls‘] = true
gitlab_rails[‘gitlab_email_from‘] = ‘18773930@qq.com‘
腾讯企业邮箱或其他邮箱例子
gitlab_rails[‘smtp_enable‘] = true
gitlab_rails[‘smtp_address‘] = "smtp.exmail.qq.com"
gitlab_rails[‘smtp_port‘] = 465
gitlab_rails[‘smtp_user_name‘] = "xxxx@ilarge.cn"
gitlab_rails[‘smtp_password‘] = "邮箱密码"
gitlab_rails[‘smtp_domain‘] = "exmail.qq.com"
gitlab_rails[‘smtp_authentication‘] = "login"
gitlab_rails[‘smtp_enable_starttls_auto‘] = true
gitlab_rails[‘smtp_tls‘] = true
gitlab_rails[‘gitlab_email_from‘] = ‘xxxx@ilarge.cn‘
配置完之后,执行编译 重启 测试
gitlab-ctl reconfigure
gitlab-ctl restart
gitlab-rails console
Notify.test_email(‘3310579331@qq.com‘,‘email title‘,‘email content desc‘).deliver_now
能正确收到测试邮件即为成功
github的搭建可以参照我另外两篇随笔,一个是ubuntu下的在线搭建,一个是centos下的在线搭建
原文:https://www.cnblogs.com/brightgreat/p/14606204.html