最新消息:欢迎加入小松的QQ群一起讨论一起学习,搜索页面修改成lua+ElasticSearch,使用php这个页面速度相对慢一点,优化之后速度杠杠的,如有问题请加群联系我

gitlab 邮件设置

其他分享 357浏览 0评论

上一篇文件讲gitlab的时候没有将邮件的设置,这一章补上
gitlab支持两种发邮件sendmail和smtp

sendmail方式

安装sendmail软件

yum -y install sendmail

修改配置

cd /home/git/gitlab
vi config/gitlab.yml

修改

## Email settings
# Uncomment and set to false if you need to disable email sending from GitLab (default: true)
# email_enabled: true
# Email address used in the "From" field in mails sent by GitLab
email_from: a454213722@163.com
email_display_name: GitLab
email_reply_to: a454213722@163.com

smtp方式

cd /home/git/gitlab
cp config/initializers/smtp_settings.rb.sample config/initializers/smtp_settings.rb

修改,我配置的163的邮件地址

if Rails.env.production?
  Gitlab::Application.config.action_mailer.delivery_method = :smtp

  ActionMailer::Base.smtp_settings = {
    address: "smtp.163.com",
    port: 25,
    user_name: "a454213722@163.com",
    password: "XXXXXXX",
    domain: "163.com",
    authentication: :plain,
    enable_starttls_auto: true,
    openssl_verify_mode: 'none' # See ActionMailer documentation for other possible options
  }
end
vi config/gitlab.yml

修改

## Email settings
# Uncomment and set to false if you need to disable email sending from GitLab (default: true)
# email_enabled: true
# Email address used in the "From" field in mails sent by GitLab
email_from: a454213722@163.com
QQ交流群:136351212(满) 455721967

如无特别说明,本站文章皆为原创,若要转载,务必请注明以下原文信息:
转载保留版权:小松博客» gitlab 邮件设置
本文链接地址:https://www.phpsong.com/2686.html

发表我的评论
取消评论
表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
木有头像就木有JJ!点这里按步骤申请Gravatar头像吧!