diff options
-rwxr-xr-x | bin/send-reports | 6 | ||||
-rw-r--r-- | templates/emails/submit-council | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/bin/send-reports b/bin/send-reports index 8e2f2bd9b..abaf8e77b 100755 --- a/bin/send-reports +++ b/bin/send-reports @@ -6,7 +6,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: matthew@mysociety.org. WWW: http://www.mysociety.org # -# $Id: send-reports,v 1.23 2007-03-21 16:23:58 matthew Exp $ +# $Id: send-reports,v 1.24 2007-03-21 16:34:46 matthew Exp $ use strict; require 5.8.0; @@ -78,8 +78,10 @@ foreach my $row (@$unsent) { push @recips, mySociety::Config::get('CONTACT_EMAIL'); my $template = File::Slurp::read_file("$FindBin::Bin/../templates/emails/submit-council"); - my %h = map { $_ => $row->{$_} } qw/title detail name email phone/; + my %h = map { $_ => $row->{$_} } qw/title detail name email phone category/; $h{phone} = "Phone: $h{phone}\n\n" if $h{phone}; + $h{category} = ($h{category} eq 'Other' ? '' : "Category: $h{category}\n\n"); + $h{category_footer} = ($h{category} ? $h{category} : 'local problems'); $h{url} = mySociety::Config::get('BASE_URL') . '/?id=' . $row->{id}; $h{councils_name} = join(' and ', @dear); $h{fuzzy} = $row->{used_map} ? 'To view a map of the precise location of this issue' diff --git a/templates/emails/submit-council b/templates/emails/submit-council index e489f8b91..3b96b8441 100644 --- a/templates/emails/submit-council +++ b/templates/emails/submit-council @@ -17,7 +17,7 @@ Name: <?=$values['name']?> Email: <?=$values['email']?> -<?=$values['phone']?>Subject: <?=$values['title']?> +<?=$values['phone']?><?=$values['category']?>Subject: <?=$values['title']?> Details: <?=$values['detail']?> @@ -29,7 +29,7 @@ Yours, The Neighbourhood Fix-It team [ This message was sent via NeighbourhoodFixIt.com, a project of UKCOD, registered charity number 1076346. If there is a more -appropriate email address for messages about local problems, +appropriate email address for messages about <?=$values['category_footer']?>, please let us know by sending an email to <team@neighbourhoodfixit.com>. This will prevent you from receiving further mail, and improve the service for local people. We also welcome any other feedback |