Emails on Push are sent to only the first recipient when using AWS SES
Summary
Emails on Push integration does not work with multiple recipients when used with AWS SES (https://aws.amazon.com/ses/getting-started/). The email notifications on git push are sent to only the first email address in the recipient list.
This looks like a regression bug as the same configuration worked well before upgrading to Gitlab-9. However, I can't go back to Gitlab-8 due to infrastructure issues.
Steps to reproduce
- Configure Gitlab SMTP to use AWS SES credentials.
- Enable Emails on Push in project settings.
- Add multiple emails separated with whitespace in the Recipients list (Project-->Settings-->Integrations-->Emails on Push)
- Commit a change and then push the changes to remote.
Example Project
This bug may not be reproducible in gitlab.com as it involves AWS SES as the SMTP service.
What is the current bug behavior?
Emails on git push are not sent to recipients except the first one.
What is the expected correct behavior?
Emails on git push should be send to all recipients.
Relevant logs and/or screenshots
2017-10-30_05:54:21.25010 2017-10-30T05:54:21.249Z 580 TID-oumuo7gt8 EmailsOnPushWorker JID-6f620711de78dd82a3637418 INFO: start
2017-10-30_05:54:22.36307 2017-10-30T05:54:22.361Z 580 TID-oumuo7gt8 EmailsOnPushWorker JID-6f620711de78dd82a3637418 INFO: Failed to send e-mail for project 'php / sam-bot' to vk@example.com: 554 Transaction failed: Duplicate header 'Auto-Submitted'.
2017-10-30_05:54:22.36309
2017-10-30_05:54:22.66357 2017-10-30T05:54:22.653Z 580 TID-oumuo7gt8 EmailsOnPushWorker JID-6f620711de78dd82a3637418 INFO: Failed to send e-mail for project 'php / sam-bot' to jj@example.com: 554 Transaction failed: Duplicate header 'Auto-Submitted'.
2017-10-30_05:54:22.66358
2017-10-30_05:54:23.60436 2017-10-30T05:54:23.604Z 580 TID-oumuo7gt8 EmailsOnPushWorker JID-6f620711de78dd82a3637418 INFO: done: 2.354 sec
Screenshot of Emails on Push page:
Results of GitLab environment info
Gitlab-10.1 is running on a CentOS-7 server, and it's installed from the yum repository.
Additional observations
The mail received by the first recipient has only one entry for Auto-Submitted
in the email header section. However, I'm not sure how emails to other recipients are crafted. I'm not an expert in Ruby and couldn't figure out whether I can get a dump of all emails sent from the instance.