aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/SendReport/Email.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/SendReport/Email.pm')
-rw-r--r--perllib/FixMyStreet/SendReport/Email.pm8
1 files changed, 8 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/SendReport/Email.pm b/perllib/FixMyStreet/SendReport/Email.pm
index 0b8ac8115..239bee715 100644
--- a/perllib/FixMyStreet/SendReport/Email.pm
+++ b/perllib/FixMyStreet/SendReport/Email.pm
@@ -4,6 +4,8 @@ use Moose;
BEGIN { extends 'FixMyStreet::SendReport'; }
+use mySociety::EmailUtil;
+
sub build_recipient_list {
my $self = shift;
my $row = shift;
@@ -66,6 +68,12 @@ sub send {
$nomail
);
+ if ( $result == mySociety::EmailUtil::EMAIL_SUCCESS ) {
+ $self->success(1);
+ } else {
+ $self->error( 'Failed to send email' );
+ }
+
return $result;
}