aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/SendReport/Email.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2013-01-11 18:14:36 +0000
committerMatthew Somerville <matthew@mysociety.org>2013-01-11 18:54:05 +0000
commitc95bec6b208a4b05a36161ac6a2c197a35bcb160 (patch)
treefd9543eb30603d72f7f04fa15d39164439979ca6 /perllib/FixMyStreet/SendReport/Email.pm
parent58569df9fe6fddc66bc0ada43dad932819d0cb09 (diff)
Zurich email alerts.
Diffstat (limited to 'perllib/FixMyStreet/SendReport/Email.pm')
-rw-r--r--perllib/FixMyStreet/SendReport/Email.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/SendReport/Email.pm b/perllib/FixMyStreet/SendReport/Email.pm
index b7c15a643..2a580c0d5 100644
--- a/perllib/FixMyStreet/SendReport/Email.pm
+++ b/perllib/FixMyStreet/SendReport/Email.pm
@@ -55,6 +55,11 @@ sub get_template {
return $template;
}
+sub send_from {
+ my ( $self, $row ) = @_;
+ return [ $row->user->email, $row->name ];
+}
+
sub send {
my $self = shift;
my ( $row, $h ) = @_;
@@ -77,7 +82,7 @@ sub send {
_template_ => $self->get_template( $row ),
_parameters_ => $h,
To => $self->to,
- From => [ $row->user->email, $row->name ],
+ From => $self->send_from( $row ),
},
mySociety::Config::get('CONTACT_EMAIL'),
\@recips,