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'] = "[email protected]" # 发件人邮箱地址
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'] = '[email protected]'
gitlab_rails['gitlab_email_display_name'] = 'gitlab' # 显示名称
gitlab_rails['gitlab_email_reply_to'] = '[email protected]' # 提示不要回复
gitlab_rails['smtp_openssl_verify_mode'] = 'none'
重启操作
gitlab-ctl reconfigure
gitlab-ctl restart
进入控制台测试发邮件功能
gitlab-rails console
Notify.test_email('收件人邮箱','标题','内容').deliver_now
管理员
> 设置
> 注册限制
> 往下滑保存
创建用户是填写对方邮箱地址
注册信息会发送到对方邮箱,进行注册
标签:gitlab,true,创建,GitLab,smtp,rails,com,email,邮件 From: https://www.cnblogs.com/qinziteng/p/16944271.html