diff options
Diffstat (limited to 'perllib/FixMyStreet/SendReport/Email.pm')
-rw-r--r-- | perllib/FixMyStreet/SendReport/Email.pm | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/SendReport/Email.pm b/perllib/FixMyStreet/SendReport/Email.pm index fa4d437fb..bac408510 100644 --- a/perllib/FixMyStreet/SendReport/Email.pm +++ b/perllib/FixMyStreet/SendReport/Email.pm @@ -1,6 +1,7 @@ package FixMyStreet::SendReport::Email; use Moose; +use FixMyStreet::Email; BEGIN { extends 'FixMyStreet::SendReport'; } @@ -92,8 +93,19 @@ sub send { To => $self->to, From => $self->send_from( $row ), }; + + my $app = FixMyStreet::App->new( cobrand => $cobrand ); + + $cobrand->munge_sendreport_params($app, $row, $h, $params) if $cobrand->can('munge_sendreport_params'); + $params->{Bcc} = $self->bcc if @{$self->bcc}; - my $result = FixMyStreet::App->send_email_cron( + + if (FixMyStreet::Email::test_dmarc($params->{From}[0])) { + $params->{'Reply-To'} = [ $params->{From} ]; + $params->{From} = [ mySociety::Config::get('CONTACT_EMAIL'), $params->{From}[1] ]; + } + + my $result = $app->send_email_cron( $params, mySociety::Config::get('CONTACT_EMAIL'), $nomail, |