SMTP example config for Zoho Mail not working
Hi all,
I recently set up my own Gitlab server. However, it took me about 2 hours to get it to work with Zoho Mail to send any email at all.
I litterally copy-pasted the example config (from smtp.md, and changed the login and password accordingly), but nothing worked. I tried tweaking the settings in many different ways without success.
It was only when I added these lines that it started to work:
gitlab_rails['gitlab_email_from'] = 'gitlab@example.com'
gitlab_rails['gitlab_email_reply_to'] = 'noreply@example.com'
Without these, I kept getting error messages in the logs that said "EOF Error", and Google searches pointed me to a bad SMTP configuration. For me, it was more about security (SSL/TLS), port number, etc. I didn't think of "from" and "reply to" email addresses at first, and chance is more people will have the same problem. The change is small so this is low priority, but it will help people avoid hours of frustration...
Here is my full SMTP config:
gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = "smtp.zoho.com"
gitlab_rails['smtp_port'] = 587
gitlab_rails['smtp_authentication'] = "plain"
gitlab_rails['smtp_enable_starttls_auto'] = true
gitlab_rails['smtp_user_name'] = "gitlab@example.com"
gitlab_rails['smtp_password'] = "*"
gitlab_rails['smtp_domain'] = "smtp.zoho.com"
gitlab_rails['gitlab_email_from'] = 'gitlab@example.com'
gitlab_rails['gitlab_email_reply_to'] = 'noreply@example.com'
```
Thanks all!