#开启smtp
gitlab_rails['smtp_enable'] = true
#126smtp地址
gitlab_rails['smtp_address'] = "smtp.126.com"
#smtp地址
gitlab_rails['smtp_port'] = 465
#smtp用户名
gitlab_rails['smtp_user_name'] = "example@126.com"
#smtp密码
gitlab_rails['smtp_password'] = "smtp_password"
#126域名
gitlab_rails['smtp_domain'] = "126.com"
#授权方式
gitlab_rails['smtp_authentication'] = "login"
gitlab_rails['smtp_enable_starttls_auto'] = true
gitlab_rails['smtp_tls'] = true
#需要与gitlab_rails['smtp_user_name'] 值一样
gitlab_rails['gitlab_email_from'] = 'example@126.com'
#发送邮件展示的名称
gitlab_rails['gitlab_email_display_name'] = 'Gitlab'
gitlab-ctl reconfigure
#打开gitlab控制台,时间有点长,需要耐心等待
gitlab-rails console
#发送邮件测试
#Notify.test_email('接收人邮箱地址','邮件主题','邮件内容').deliver_now
Notify.test_email('example@163.com','gitlab邮件配置','测试邮件内容').deliver_now
Traceback (most recent call last):
1: from (irb):1
Net::SMTPFatalError (553 Mail from must equal authorized user)
Traceback (most recent call last):
1: from (irb):1
OpenSSL::SSL::SSLError (SSL_connect returned=1 errno=0 state=error: wrong version number)
irb(main):002:0>
欢迎光临 黑帽联盟 (https://bbs.cnblackhat.com/) | Powered by Discuz! X2.5 |