Tbpgr Blog

Employee Experience Engineer tbpgr(てぃーびー) のブログ

GitLab | 通知メールに外部のメールサーバーを利用する際の設定について

概要

通知メールに外部のメールサーバーを利用する際の設定

詳細

通知メールに外部のメールサーバーを利用する際の設定について

/home/git/gitlab/config/environments/production.rb
を編集します。。下記を追記します。

例はgmailの場合

config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
  :address              => "smtp.gmail.com",
  :port                 => 587,
  :domain               => 'gmail.com',
  :user_name            => 'sample@sample',
  :password             => 'password',
  :authentication       =>  :plain,
  :enable_starttls_auto => true
}

※user_name、password、authentication、enable_starttls_autoは省略することも可能。

試しにGitLabでユーザーを追加して、通知メールを確認してみる

Hi user_name!

The Administrator created an account for you. Now you are a member of the company GitLab application.

login.................. user_name@some.domain
  password............... some_password

  You will be forced to change this password immediately after login.


Click here to login: http://ip or domain/