gitlab发送邮件测试

警告
本文最后更新于 2020-05-30 17:09,文中内容可能已过时。
vim /etc/gitlab/gitlab.rb
#52行左右
gitlab_rails['gitlab_email_enabled'] = true
gitlab_rails['gitlab_email_from'] = '你的邮箱'
gitlab_rails['gitlab_email_display_name'] = 'soulchild-gitlab'

#517行左右
gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = "smtp.qq.com"
gitlab_rails['smtp_port'] = 465
gitlab_rails['smtp_user_name'] = "你的邮箱"
gitlab_rails['smtp_password'] = "授权码"
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 console

irb(main):001:0> Notify.test_email('xxxx@qq.com', 'Message Subject', 'Message Body').deliver_now
请我喝杯水
SoulChild 微信号 微信号
SoulChild 微信打赏 微信打赏
0%