GitLab配置创建用户邮件提醒
vi gitlab.rb
gitlab_rails['smtp_enable'] = true # 启动smtp功能
gitlab_rails['smtp_address'] = "smtp.163.com" # smtp服务器地址
gitlab_rails['smtp_port'] = 465 # smtp端口
gitlab_rails['smtp_user_name'] = "qinziteng05@163.com" # 发件人邮箱地址
gitlab_rails['smtp_password'] = "SJEMBHYLJZIAQJMX" # 授权码,不是密码
gitlab_rails['smtp_domain'] = "163.com"
gitlab_rails['smtp_authentication'] = "login"
gitlab_rails['smtp_enable_starttls_auto'] = true
gitlab_rails['smtp_tls'] = true
gitlab_rails['gitlab_email_enabled'] = true
gitlab_rails['gitlab_email_from'] = 'qinziteng05@163.com'
gitlab_rails['gitlab_email_display_name'] = 'gitlab' # 显示名称
gitlab_rails['gitlab_email_reply_to'] = 'noreply@example.com' # 提示不要回复
gitlab_rails['smtp_openssl_verify_mode'] = 'none'
重启操作
gitlab-ctl reconfigure
gitlab-ctl restart
进入控制台测试发邮件功能
gitlab-rails console
Notify.test_email('收件人邮箱','标题','内容').deliver_now
管理员
> 设置
> 注册限制
> 往下滑保存
创建用户是填写对方邮箱地址
注册信息会发送到对方邮箱,进行注册