diff options
author | Hakim Cassimally <hakim@mysociety.org> | 2015-03-03 17:52:05 +0000 |
---|---|---|
committer | Dave Arter <davea@mysociety.org> | 2015-10-06 09:09:23 +0100 |
commit | 597019d4fc28d160588d137ac58d948393f26af2 (patch) | |
tree | a35d552f83b962bc7b54ac0f3f5cb113251f2795 /perllib/FixMyStreet/SendReport | |
parent | 014d2a4342d1dbe7d2987376974b20116439e07d (diff) |
Allow attachment of emails in email_send
Required by Zurich for mysociety/FixMyStreet-Commercial#675
Diffstat (limited to 'perllib/FixMyStreet/SendReport')
-rw-r--r-- | perllib/FixMyStreet/SendReport/Email.pm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/SendReport/Email.pm b/perllib/FixMyStreet/SendReport/Email.pm index 9fec0ac9c..bac408510 100644 --- a/perllib/FixMyStreet/SendReport/Email.pm +++ b/perllib/FixMyStreet/SendReport/Email.pm @@ -93,6 +93,11 @@ 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}; if (FixMyStreet::Email::test_dmarc($params->{From}[0])) { @@ -100,7 +105,7 @@ sub send { $params->{From} = [ mySociety::Config::get('CONTACT_EMAIL'), $params->{From}[1] ]; } - my $result = FixMyStreet::App->send_email_cron( + my $result = $app->send_email_cron( $params, mySociety::Config::get('CONTACT_EMAIL'), $nomail, |