gitlab邮件设置

[[email protected] ~]# vi /etc/gitlab/gitlab.rb

gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = "smtp.exmail.qq.com"
gitlab_rails['smtp_port'] = 465
gitlab_rails['smtp_user_name'] = "[email protected]"
gitlab_rails['smtp_password'] = "****"
gitlab_rails['smtp_authentication'] = "login"
gitlab_rails['smtp_enable_starttls_auto'] = true
gitlab_rails['smtp_tls'] = true
gitlab_rails['gitlab_email_from'] = '[email protected]

[[email protected] gitlab]# gitlab-ctl reconfigure

测试
[[email protected] gitlab]# gitlab-rails console
-------------------------------------------------------------------------------------
GitLab: 11.7.5 (c5b5b18)
GitLab Shell: 8.4.4
postgresql: 9.6.11
-------------------------------------------------------------------------------------
Loading production environment (Rails 5.0.7.1)
irb(main):003:0> Notify.test_email('自己的能收邮件的邮箱@qq.com', 'Message Subject', 'Message Body').deliver_now
然后输出一大串日志,成功的话能看出来,而且能收到邮件, 然后去网页试试忘记密码输入邮箱会收到一个重置密码的邮件

猜你喜欢

转载自blog.51cto.com/12390045/2350232
0条评论
添加一条新回复