]> source.dussan.org Git - redmine.git/commit
Send individual emails for each mail recipient (#26791).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 6 Oct 2018 13:08:52 +0000 (13:08 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 6 Oct 2018 13:08:52 +0000 (13:08 +0000)
commit015ca366341ba2fa9f1d7903907ddab19a87865f
treefce88f7a0fb880d3584352e255dfd420c3e798d6
parentb41096d9d00b0eb4c9004936b4ed5f127ec3f2c4
Send individual emails for each mail recipient (#26791).

We are creating multipe mails per class notification event, one per
recipient, wrapped in a Mailer::MultiMessage object to send them all at
once.

We keep the existing interface of all class methods intended to be used
by external code the same as they were before, with one exception:

We provide additional recipient addresses in options[:recipients] for
Mailer.security_notification. Since the first-class recipients have to
be users to render individual mails for them, additional recipient
addresses have to be provided with some other channel.

By providing additional recipients in options[:recipients], we can solve
the use-case for address change notifications for users, which probably
is the only real use-case for having to use a plain email address
instead of a User as a notification recipient.

Patch by Holger Just and Marius BALTEANU.

git-svn-id: http://svn.redmine.org/redmine/trunk@17583 e93f8b46-1217-0410-a6f0-8f06a7374b81
22 files changed:
app/models/email_address.rb
app/models/mailer.rb
app/views/mailer/security_notification.html.erb
app/views/mailer/security_notification.text.erb
app/views/mailer/settings_updated.html.erb
app/views/mailer/settings_updated.text.erb
test/functional/documents_controller_test.rb
test/functional/issues_controller_test.rb
test/functional/issues_custom_fields_visibility_test.rb
test/functional/messages_controller_test.rb
test/functional/news_controller_test.rb
test/unit/changeset_test.rb
test/unit/comment_test.rb
test/unit/document_test.rb
test/unit/issue_test.rb
test/unit/journal_observer_test.rb
test/unit/journal_test.rb
test/unit/mail_handler_test.rb
test/unit/mailer_test.rb
test/unit/news_test.rb
test/unit/repository_test.rb
test/unit/wiki_content_test.rb