aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/App/Controller')
-rw-r--r--perllib/FixMyStreet/App/Controller/Alert.pm10
-rw-r--r--perllib/FixMyStreet/App/Controller/Report/New.pm16
-rw-r--r--perllib/FixMyStreet/App/Controller/Report/Update.pm6
3 files changed, 10 insertions, 22 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Alert.pm b/perllib/FixMyStreet/App/Controller/Alert.pm
index b5258ae79..e7eab09b8 100644
--- a/perllib/FixMyStreet/App/Controller/Alert.pm
+++ b/perllib/FixMyStreet/App/Controller/Alert.pm
@@ -301,15 +301,7 @@ sub send_confirmation_email : Private {
$c->stash->{token_url} = $c->uri_for_email( '/A', $token->token );
- my $sender = mySociety::Config::get('CONTACT_EMAIL');
-
- $c->send_email(
- 'alert-confirm.txt',
- {
- to => $c->stash->{alert}->user->email,
- from => $sender
- }
- );
+ $c->send_email( 'alert-confirm.txt', { to => $c->stash->{alert}->user->email } );
$c->stash->{template} = 'email_sent.html';
}
diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm
index 1d08de29d..3e71cb0bd 100644
--- a/perllib/FixMyStreet/App/Controller/Report/New.pm
+++ b/perllib/FixMyStreet/App/Controller/Report/New.pm
@@ -251,17 +251,7 @@ sub report_import : Path('/import') {
$c->stash->{report} = $report;
$c->stash->{token_url} = $c->uri_for_email( '/L', $token->token );
- my $sender = mySociety::Config::get('CONTACT_EMAIL');
- $sender =~ s/team/fms-DO-NOT-REPLY/;
-
- # TODO - used to be sent using EvEl
- $c->send_email(
- 'partial.txt',
- {
- to => $report->user->email,
- from => $sender
- }
- );
+ $c->send_email( 'partial.txt', { to => $report->user->email, } );
$c->res->body('SUCCESS');
return 1;
@@ -945,7 +935,9 @@ sub redirect_or_confirm_creation : Private {
$c->model("DB::Token")
->create( { scope => 'problem', data => $report->id } );
$c->stash->{token_url} = $c->uri_for_email( '/P', $token->token );
- $c->send_email( 'problem-confirm.txt', { to => $report->user->email } );
+ $c->send_email( 'problem-confirm.txt', {
+ to => [ [ $report->user->email, $report->name ] ],
+ } );
# tell user that they've been sent an email
$c->stash->{template} = 'email_sent.html';
diff --git a/perllib/FixMyStreet/App/Controller/Report/Update.pm b/perllib/FixMyStreet/App/Controller/Report/Update.pm
index e0a7033b9..fe512d03c 100644
--- a/perllib/FixMyStreet/App/Controller/Report/Update.pm
+++ b/perllib/FixMyStreet/App/Controller/Report/Update.pm
@@ -292,7 +292,11 @@ sub redirect_or_confirm_creation : Private {
}
);
$c->stash->{token_url} = $c->uri_for_email( '/C', $token->token );
- $c->send_email( 'update-confirm.txt', { to => $update->user->email } );
+ $c->send_email( 'update-confirm.txt', {
+ to => $update->name
+ ? [ [ $update->user->email, $update->name ] ]
+ : $update->user->email,
+ } );
# tell user that they've been sent an email
$c->stash->{template} = 'email_sent.html';