typora/note/devops/gitlab/发送邮件配置.md
2024-12-12 10:48:55 +08:00

765 B
Raw Permalink Blame History

gitlab.rb添加以下配置

gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = "smtp.163.com"
gitlab_rails['smtp_port'] = 465
gitlab_rails['smtp_user_name'] = "15735657423@163.com"
gitlab_rails['smtp_password'] = "HJYXCQIGREDDVHQI"    #163授权的密码非登陆密码
gitlab_rails['smtp_domain'] = "smtp.163.com"
gitlab_rails['smtp_authentication'] = "login"
gitlab_rails['gitlab_email_from'] = "15735657423@163.com"
gitlab_rails['gitlab_email_reply_to'] = "noreply@gitlab.heysq.com"
gitlab_rails['smtp_tls'] = true
# <!-- gitlab_rails['smtp_enable_starttls_auto'] = true -->

测试邮件

gitlab-rails c -e production
Notify.test_email('1904705132@qq.com', 'Message Subject', 'Message Body').deliver_now