765 B
765 B
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