Skip to content

Instantly share code, notes, and snippets.

@damko
Last active December 31, 2015 03:59
Show Gist options
  • Save damko/7931014 to your computer and use it in GitHub Desktop.
Save damko/7931014 to your computer and use it in GitHub Desktop.
Gitlab 6.3.1 Gmail configuration

Gitlab 6.3.1 Gmail configuration

Copy or rename the sample smtp settings file into smtp_settings.rb

sudo -u git -H cp config/initializers/smtp_settings.rb.sample config/initializers/smtp_settings.rb

Note: in 6.3.1 there is no need to modify config/environments/production.rb line: config.action_mailer.delivery_method. Leave the original value :sendmail

Edit smtp_settings.rb as follow

sudo -u git -H vim config/initializers/smtp_settings.rb


if Rails.env.production?
	Gitlab::Application.config.action_mailer.delivery_method = :smtp
		  
		ActionMailer::Base.smtp_settings = {
		address: "smtp.googlemail.com",
		port: 587,
		user_name: "[email protected]",
		password: "password",
		domain: "domain.com",
		authentication: :plain,
		enable_starttls_auto: true,
		
	}
end

Restart gitlab service

service gitlab restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment