Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GitLab email notification not working

I just set up gitlab on my dedicated server, As Admin I created a new user, He should normally receive an email with his password, But He doesn't.

What I want to know is how to configure email notifications (with SMTP).

PS: I'm not familiar with Ruby environment at all.

Thank you.

Update : it works now, I just forgot to install postfix when setting up gitlab

Update 2 : Finally I've choose to use an SMTP account to send email notifications:

Personally I've an Amazone account (You Can use Gmail) :

1) In /home/git/gitlab/config/envirenoments/production.rb comment this line :

#config.action_mailer.delivery_method = :sendmail

2) Add this (with correct credentials) just before end tag :

config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
     :address => 'gmail.com', // Or an other SMTP provider 
     :port => 467, // Port depends on your provider
     :domain => 'gitlab.yourserver.com', // Your Gitlab main url
     :authentication => :plain,
     :user_name => 'your gmail id',
     :password => 'yourPassword',
     :enable_starttls_auto => true
 }

Thank you, I hope it gonna help you.

like image 438
Adil Ouchraa Avatar asked Nov 23 '22 01:11

Adil Ouchraa


1 Answers

Finally I've chosen to use an SMTP account to send email notifications:

Personally I've an Amazone account (You Can use Gmail) :

1) In /home/git/gitlab/config/envirenoments/production.rb comment this line :

#config.action_mailer.delivery_method = :sendmail

2) Add this (with correct credentials) just before end tag :

config.action_mailer.delivery_method = :smtp

config.action_mailer.smtp_settings = {
     :address => 'gmail.com', # Or an other SMTP provider 
     :port => 467, # Port depends on your provider
     :domain => 'gitlab.yourserver.com', # Your Gitlab main url
     :authentication => :plain,
     :user_name => 'your gmail id',
     :password => 'yourPassword',
     :enable_starttls_auto => true  }

Thank you, I hope it gonna help you.

like image 186
Adil Ouchraa Avatar answered Dec 06 '22 08:12

Adil Ouchraa