Skip to content

Instantly share code, notes, and snippets.

@xavierjurado
Created July 18, 2012 20:53
Show Gist options
  • Star 37 You must be signed in to star a gist
  • Fork 6 You must be signed in to fork a gist
  • Save xavierjurado/3138813 to your computer and use it in GitHub Desktop.
Save xavierjurado/3138813 to your computer and use it in GitHub Desktop.
Gitlab Gmail configuration

Gitlab Gmail configuration

In Gitlab 2.6 you must edit the following files in order to send messages through a Gmail account (also applicable to Google Apps accounts).

config/environments/production.rb

config.action_mailer.delivery_method = :smtp
config.action_mailer.perform_deliveries = true
config.action_mailer.raise_delivery_errors = true

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

config/gitlab.yml

# Gitlab application config file
# Email used for notification
# about new issues, comments
email:
 from: account@gmail.com
  …
@eropple
Copy link

eropple commented Jul 21, 2012

Nifty. Thanks for pointing me at this.

@petermanser
Copy link

@fdalfonso
Copy link

I am getting a network unreachable in the log with error 2 but the vm is connected and resolve the names.

@fthamura
Copy link

i wish email and smtp will be in web admin setting, no need config to production.rb directly

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