aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Script/Alerts.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2016-02-02 17:47:18 +0000
committerMatthew Somerville <matthew@mysociety.org>2016-02-23 13:11:37 +0000
commit28144f5153a0a7f7bad9466c883bd5c147568028 (patch)
treeed205b75e336fa53d4f622451d3209cfcae31915 /perllib/FixMyStreet/Script/Alerts.pm
parent06b8a48093a0ce395ea6824e6b00afec444447c3 (diff)
Better handle replies to bounce addresses.
Auto unsubscribe alert bounces, forward on report bounces and alert replies to support, and send through to report creator non-bounce replies to their report (for systems that ignore both the From and Reply-To headers). Also forward any totally unparsed bounce to support to possibly then adjust this bounce handling.
Diffstat (limited to 'perllib/FixMyStreet/Script/Alerts.pm')
-rw-r--r--perllib/FixMyStreet/Script/Alerts.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/Script/Alerts.pm b/perllib/FixMyStreet/Script/Alerts.pm
index fea897a24..e799a5446 100644
--- a/perllib/FixMyStreet/Script/Alerts.pm
+++ b/perllib/FixMyStreet/Script/Alerts.pm
@@ -250,6 +250,11 @@ sub _send_aggregated_alert_email(%) {
my $template = FixMyStreet->get_email_template($cobrand->moniker, $data{lang}, "$data{template}.txt");
+ my $sender = sprintf('<fms-%s@%s>',
+ FixMyStreet::Email::generate_verp_token('alert', $data{alert_id}),
+ FixMyStreet->config('EMAIL_DOMAIN')
+ );
+
my $result = FixMyStreet::Email::send_cron(
$data{schema},
{
@@ -257,7 +262,7 @@ sub _send_aggregated_alert_email(%) {
_parameters_ => \%data,
To => $data{alert_email},
},
- undef,
+ $sender,
0,
$cobrand,
$data{lang}