Gitlab7.8.x 配置郵件功能

第一步:更改配置文件
chuck@ubuntu:/opt/gitlab-7.8.1-0/apps/gitlab/htdocs/config/initializers$ cp smtp_settings.rb.sample smtp_settings.rb
chuck@ubuntu:/opt/gitlab-7.8.1-0/apps/gitlab/htdocs/config/initializers$ vi smtp_settings.rb
# To enable smtp email delivery for your GitLab instance do the following:
# To enable smtp email delivery for your GitLab instance do the following:
# 1. Rename this file to smtp_settings.rb
# 2. Edit settings inside this file
# 3. Restart GitLab instance
#
if Rails.env.production?
  Gitlab::Application.config.action_mailer.delivery_method = :smtp

  ActionMailer::Base.smtp_settings = {
    address: "smtp.163.com",
    port: 25,
    user_name: "user_name",
    password: "password",
    domain: "163.com",
    authentication: :plain,
    enable_starttls_auto: true,
#  openssl_verify_mode: 'none'    //註釋掉這行
  }
end
第二步:重啓gitlab
chuck@ubuntu:/opt/gitlab-7.8.1-0$ sudo ./ctlscript.sh restart
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章