Skip to content
GitLab
Next
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    Projects Groups Snippets
  • Sign up now
  • Login
  • Sign in / Register
  • GitLab FOSS GitLab FOSS
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 1
    • Issues 1
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1
    • Merge requests 1
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.orgGitLab.org
  • GitLab FOSSGitLab FOSS
  • Issues
  • #2143
Closed
Open
Issue created Jul 31, 2015 by Maël Valais@maelvlsContributor

SMTP Gmail account working on gitlab but not on gitlab-ci

Hi,

I configured, in /etc/gitlab/gitlab.rb, the gitlab_rails SMTP configuration.

 gitlab_rails['smtp_enable'] = true
 gitlab_rails['smtp_address'] = "smtp.gmail.com"
 gitlab_rails['smtp_port'] = 587
 gitlab_rails['smtp_user_name'] = "account@gmail.com"
 gitlab_rails['smtp_password'] = "password"
 gitlab_rails['smtp_domain'] = "smtp.gmail.com"
 gitlab_rails['smtp_authentication'] = "login"
 gitlab_rails['smtp_enable_starttls_auto'] = true
 gitlab_rails['smtp_tls'] = false
 gitlab_rails['smtp_openssl_verify_mode'] = 'peer'

It works fine. But when I want it to work for gitlab-ci, I put then same config and I don't receive failed build emails. Here is the configuration :

 gitlab_ci['smtp_enable'] = true
 gitlab_ci['smtp_address'] = "smtp.gmail.com"
 gitlab_ci['smtp_port'] = 587
 gitlab_ci['smtp_user_name'] = "account@gmail.com"
 gitlab_ci['smtp_password'] = "password"
 gitlab_ci['smtp_domain'] = "smtp.gmail.com"
 gitlab_ci['smtp_authentication'] = "login"
 gitlab_ci['smtp_enable_starttls_auto'] = true
 gitlab_ci['smtp_tls'] = false
 gitlab_ci['smtp_openssl_verify_mode'] = 'peer'

And it just doesn't work! In gitlab-ci, the Test settings says We successfully tested the service. But I don't receive any mails!

I verified in the logs (btw, there should be more documentation on how debug gitlab-ci). I did sudo cat /var/log/gitlab/gitlab-ci/production.log | grep mail and here is the result (I took only the last lines):

  Rendered notify/build_fail_email.html.haml within layouts/notify (4.3ms)
  Rendered notify/build_fail_email.text.erb (0.5ms)
Sent mail to *****@gmail.com (2263.7ms)

But I didn't receive that mail... And no error message.

What is wrong with my configuration?

Assignee
Assign to
Time tracking