GitLab电子邮件通知无效

时间:2014-03-17 16:49:14

标签: git email notifications smtp gitlab

我只是在我的专用服务器上设置了gitlab,作为管理员我创建了一个新用户,他通常应该收到一封带有密码的电子邮件,但他没有。

我想知道的是如何配置电子邮件通知(使用SMTP)。

PS:我根本不熟悉Ruby环境。

谢谢。

更新:它现在有效,我忘了在设置gitlab时安装postfix

更新2:最后我选择使用SMTP帐户发送电子邮件通知:

就我个人而言,我有一个Amazone帐户(你可以使用Gmail):

1)在/home/git/gitlab/config/envirenoments/production.rb中评论此行:

#config.action_mailer.delivery_method = :sendmail

2)在结束标记之前添加(使用正确的凭据):

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
 }

谢谢,我希望它会帮助你。

2 个答案:

答案 0 :(得分:6)

最后,我选择使用SMTP帐户发送电子邮件通知:

我个人使用Amazone帐户(您可以使用Gmail):

1)在/home/git/gitlab/config/envirenoments/production.rb中评论此行:

#config.action_mailer.delivery_method = :sendmail

2)在结束标记之前添加(使用正确的凭据):

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  }

谢谢,我希望它会帮助你。

答案 1 :(得分:-6)

请按照安装指南,其中包含设置电子邮件的说明。

相关问题