I have setup Gitlab CE on a local Ubuntu Server, and I'm trying to use Zoho to send email to users. But, mails are not sent. Even when testing with gitlab-rails console
:
irb(main):003:0> Notify.test_email('[email protected]', 'Message Subject', 'Message Body').deliver_now
My SMTP config is as follow :
gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = "smtp.zoho.com"
gitlab_rails['smtp_port'] = 587 # I've also changed to 465, but in vain
gitlab_rails['smtp_authentication'] = "plain"
gitlab_rails['smtp_enable_starttls_auto'] = true
gitlab_rails['smtp_user_name'] = "[email protected]"
gitlab_rails['smtp_password'] = "mypassword"
gitlab_rails['smtp_domain'] = "smtp.zoho.com"
And Reply by email config :
gitlab_rails['incoming_email_enabled'] = true
gitlab_rails['incoming_email_address'] = "gitlab-incoming+{key}@domain.com"
gitlab_rails['incoming_email_email'] = "[email protected]"
gitlab_rails['incoming_email_password'] = "Password"
gitlab_rails['incoming_email_host'] = "imap.zoho.com"
gitlab_rails['incoming_email_port'] = 993
gitlab_rails['incoming_email_ssl'] = true
gitlab_rails['incoming_email_mailbox_name'] = "inbox"
gitlab_rails['incoming_email_idle_timeout'] = 60
Can somebody help me fix this ?
Update : This is the output of the test in gitlab_rails console
Notify#test_email: processed outbound mail in 414.5ms
Sent mail to [email protected] (65666.5ms) Date: Wed, 23 Nov 2016 12:47:12 +0100 From: GitLab Reply-To: GitLab
Message-ID: <583581c03dae3_a7303fac34cdb0fc64a7@administrateur-virtual-machine.mail>
Subject: Test
Mime-Version: 1.0
Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit
Testons
Net::ReadTimeout: Net::ReadTimeout from /opt/gitlab/embedded/lib/ruby/2.3.0/net/protocol.rb:158:in
rbuf_fill' from /opt/gitlab/embedded/lib/ruby/2.3.0/net/protocol.rb:136:in
readuntil' from /opt/gitlab/embedded/lib/ruby/2.3.0/net/protocol.rb:146:inreadline' from /opt/gitlab/embedded/lib/ruby/2.3.0/net/smtp.rb:946:in
recv_response' from /opt/gitlab/embedded/lib/ruby/2.3.0/net/smtp.rb:556:inblock in do_start' from /opt/gitlab/embedded/lib/ruby/2.3.0/net/smtp.rb:956:in
critical' from /opt/gitlab/embedded/lib/ruby/2.3.0/net/smtp.rb:556:indo_start' from /opt/gitlab/embedded/lib/ruby/2.3.0/net/smtp.rb:521:in
start' from /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/mail-2.6.4/lib/mail/network/deli very_methods/smtp.rb:113:indeliver!' from /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/mail-2.6.4/lib/mail/message.rb:2 149:in
do_delivery' from /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/mail-2.6.4/lib/mail/message.rb:2 37:inblock in deliver' from /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/actionmailer-4.2.7.1/lib/action_ mailer/base.rb:543:in
block in deliver_mail' from /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active _support/notifications.rb:164:inblock in instrument' from /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active _support/notifications/instrumenter.rb:20:in
instrument' from /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active _support/notifications.rb:164:ininstrument' from /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/actionmailer-4.2.7.1/lib/action_ mailer/base.rb:541:in
deliver_mail' from /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/mail-2.6.4/lib/mail/message.rb:2 37:indeliver' from /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/actionmailer-4.2.7.1/lib/action_ mailer/message_delivery.rb:85:in
deliver_now' from (irb):1 from /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/comma nds/console.rb:110:instart' from /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/comma nds/console.rb:9:in
start' from /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/comma nds/commands_tasks.rb:68:inconsole' from /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/comma nds/commands_tasks.rb:39:in
run_command!' from /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/comma nds.rb:17:in<top (required)>' from bin/rails:9:in
require' from bin/rails:9:in `'