aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Report
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2011-06-07 16:46:19 +0100
committerStruan Donald <struan@exo.org.uk>2011-06-07 16:46:19 +0100
commit0f7de6563d4c96fa1ec9c429cca7e42259e25422 (patch)
tree44383db10edd2136e471bba208170550d095b97d /perllib/FixMyStreet/App/Controller/Report
parenta82a51695eacf94b7523502b3a48e1de6836fec0 (diff)
parent77460615cf9d08175e385ada6e03ba96b512c935 (diff)
Merge branch 'migrate_to_catalyst' of ssh://git.mysociety.org/data/git/public/fixmystreet into migrate_to_catalyst
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Report')
-rw-r--r--perllib/FixMyStreet/App/Controller/Report/New.pm16
-rw-r--r--perllib/FixMyStreet/App/Controller/Report/Update.pm6
2 files changed, 9 insertions, 13 deletions
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';