aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/DB/ResultSet/Questionnaire.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2015-01-09 22:55:08 +0000
committerMatthew Somerville <matthew@mysociety.org>2015-01-13 16:28:50 +0000
commit676181084d88b0ec94d42521162b4571cb0c0552 (patch)
tree744979e676295aa7daf2de3aa03818b1f6419fb6 /perllib/FixMyStreet/DB/ResultSet/Questionnaire.pm
parent4ae8d597a80d91084dcdcd999d480f41a57c70d1 (diff)
Use same handling for cron and non-cron email.
This means that e.g. SMTP authentication is used when set up by all emails, not just non-cron ones. Fixes #988.
Diffstat (limited to 'perllib/FixMyStreet/DB/ResultSet/Questionnaire.pm')
-rw-r--r--perllib/FixMyStreet/DB/ResultSet/Questionnaire.pm4
1 files changed, 1 insertions, 3 deletions
diff --git a/perllib/FixMyStreet/DB/ResultSet/Questionnaire.pm b/perllib/FixMyStreet/DB/ResultSet/Questionnaire.pm
index b7af9e60e..646967bfc 100644
--- a/perllib/FixMyStreet/DB/ResultSet/Questionnaire.pm
+++ b/perllib/FixMyStreet/DB/ResultSet/Questionnaire.pm
@@ -5,7 +5,6 @@ use strict;
use warnings;
use Encode;
use Utils;
-use mySociety::EmailUtil;
sub send_questionnaires {
my ( $rs, $params ) = @_;
@@ -103,11 +102,10 @@ sub send_questionnaires_period {
From => [ $sender, $sender_name ],
},
$sender,
- [ $row->user->email ],
$params->{nomail},
$cobrand
);
- if ($result == mySociety::EmailUtil::EMAIL_SUCCESS) {
+ unless ($result) {
print " ...success\n" if $params->{verbose};
$row->update();
$token->insert();