diff options
author | Struan Donald <struan@exo.org.uk> | 2012-04-03 16:48:11 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2012-04-03 16:48:11 +0100 |
commit | f531995b83e8448de25adab411673ec38e555385 (patch) | |
tree | 0d8090d554de7879963f4e1dfcd26c3bc7338dd0 /perllib/FixMyStreet/SendReport/Email.pm | |
parent | 8bfb404c462cdc950b946a5de73152c2e8a7e502 (diff) |
update send failed data if fail to send a report
add code in to save success and errors
Diffstat (limited to 'perllib/FixMyStreet/SendReport/Email.pm')
-rw-r--r-- | perllib/FixMyStreet/SendReport/Email.pm | 8 |
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; } |