Skip to content

Instantly share code, notes, and snippets.

@petermanser
Last active September 9, 2016 19:48
Show Gist options
  • Star 15 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save petermanser/6117494 to your computer and use it in GitHub Desktop.
Save petermanser/6117494 to your computer and use it in GitHub Desktop.
Gitlab 5.4 - Gmail configuration

Gitlab 5.4 - Gmail configuration

In order to send messages through a Gmail account (also applicable to Google Apps accounts) add the following parts to your config files:

Files:

  • config/environments/production.rb
  • config/gitlab.yml
## Email settings
# Email address used in the "From" field in mails sent by GitLab
email_from: youruser@yourdomain.com
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 => 'youruser@yourdomain.com',
:password => 'password',
:authentication => 'plain',
:enable_starttls_auto => true
}
@user20161119
Copy link

after config,need to reastart which servcices?and the domain name is must?

@henrich-m
Copy link

Restart the GitLab service - (ubuntu : # service gitlab resrtart )

@samrocketman
Copy link

@JanWen this assumes you're using Google Apps. That's why it says @yourdomain.com. If you're not using Google Apps then @yourdomain.com is just @gmail.com.

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