summaryrefslogtreecommitdiffstats
path: root/app/views
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2018-10-06 13:08:52 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2018-10-06 13:08:52 +0000
commit015ca366341ba2fa9f1d7903907ddab19a87865f (patch)
treefce88f7a0fb880d3584352e255dfd420c3e798d6 /app/views
parentb41096d9d00b0eb4c9004936b4ed5f127ec3f2c4 (diff)
downloadredmine-015ca366341ba2fa9f1d7903907ddab19a87865f.tar.gz
redmine-015ca366341ba2fa9f1d7903907ddab19a87865f.zip
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
Diffstat (limited to 'app/views')
-rw-r--r--app/views/mailer/security_notification.html.erb3
-rw-r--r--app/views/mailer/security_notification.text.erb3
-rw-r--r--app/views/mailer/settings_updated.html.erb4
-rw-r--r--app/views/mailer/settings_updated.text.erb4
4 files changed, 6 insertions, 8 deletions
diff --git a/app/views/mailer/security_notification.html.erb b/app/views/mailer/security_notification.html.erb
index 309e9437f..84394d1ab 100644
--- a/app/views/mailer/security_notification.html.erb
+++ b/app/views/mailer/security_notification.html.erb
@@ -9,5 +9,4 @@
<p><%= l(:field_user) %>: <strong><%= @originator.login %></strong><br/>
<%= l(:field_remote_ip) %>: <strong><%= @remote_ip %></strong><br/>
-<%= l(:label_date) %>: <strong><%= format_time Time.now, true, @user %></strong></p>
-
+<%= l(:label_date) %>: <strong><%= format_time Time.now, true %></strong></p>
diff --git a/app/views/mailer/security_notification.text.erb b/app/views/mailer/security_notification.text.erb
index 5be036b7a..7ff3f3d57 100644
--- a/app/views/mailer/security_notification.text.erb
+++ b/app/views/mailer/security_notification.text.erb
@@ -4,5 +4,4 @@
<%= l(:field_user) %>: <%= @originator.login %>
<%= l(:field_remote_ip) %>: <%= @remote_ip %>
-<%= l(:label_date) %>: <%= format_time Time.now, true, @user %>
-
+<%= l(:label_date) %>: <%= format_time Time.now, true %>
diff --git a/app/views/mailer/settings_updated.html.erb b/app/views/mailer/settings_updated.html.erb
index 8596089a2..c50eb9ea1 100644
--- a/app/views/mailer/settings_updated.html.erb
+++ b/app/views/mailer/settings_updated.html.erb
@@ -8,7 +8,7 @@
<%= link_to @url, @url %>
-<p><%= l(:field_user) %>: <strong><%= User.current.login %></strong><br/>
-<%= l(:field_remote_ip) %>: <strong><%= User.current.remote_ip %></strong><br/>
+<p><%= l(:field_user) %>: <strong><%= @sender.login %></strong><br/>
+<%= l(:field_remote_ip) %>: <strong><%= @sender.remote_ip %></strong><br/>
<%= l(:label_date) %>: <strong><%= format_time Time.now, true %></strong></p>
diff --git a/app/views/mailer/settings_updated.text.erb b/app/views/mailer/settings_updated.text.erb
index 51a2a8f6a..9b0be909d 100644
--- a/app/views/mailer/settings_updated.text.erb
+++ b/app/views/mailer/settings_updated.text.erb
@@ -6,7 +6,7 @@
<%= @url %>
-<%= l(:field_user) %>: <%= User.current.login %>
-<%= l(:field_remote_ip) %>: <%= User.current.remote_ip %>
+<%= l(:field_user) %>: <%= @sender.login %>
+<%= l(:field_remote_ip) %>: <%= @sender.remote_ip %>
<%= l(:label_date) %>: <%= format_time Time.now, true %>