If you enter the following RFC 2822 compliant address:
`John Doe <john@doe.com>`
Gitlab will attempt to send three emails:
1) John
2) Doe
3) john@doe.com
With this change given the following:
`John Doe <johndoe@example.com>`
`Jane Doe <janedoe@example.com>`
Gitlab will send emails to `johndoe@example.com` and `janedoe@example.com`
`:mailer` is needed to pick it easily, while
`type: :mailer` is needed for picking it automatically for
tests located in spec/mailers/*_spec.rb
It's a bit complicated in spec/services/notification_service_spec.rb
but we'll leave it alone for now.
The repository push email can be very expensive to generate, especially
with syntax-highlighted diffs. Instead of generating the email for each
recipient, generate one email object and reset the Message-Id and To
headers for each recipient. (Cloning would also be expensive in the case
of large emails, although probably not as bad as generating from
scratch.)