Bug 8463 - Koha/SearchEngine/Solr/Search.pm fails perlcritic test
[koha.git] / misc / cronjobs / smsoverdues.pl
index c2a6913..6415eb6 100755 (executable)
@@ -27,6 +27,9 @@
 
 # $Id: sendoverdues.pl,v 1.1.2.1 2007/03/26 22:38:09 tgarip1957 Exp $
 
+#use strict;
+#use warnings; FIXME - Bug 2505
+
 BEGIN {
     # find Koha's Perl modules
     # test carefully before changing this
@@ -37,13 +40,13 @@ BEGIN {
 use C4::Context;
 use C4::Search;
 use C4::Circulation;
-use C4::Circulation::Fines;
 use C4::Members;
 use C4::Dates qw/format_date/;
 use HTML::Template::Pro;
 use Mail::Sendmail;
 use Mail::RFC822::Address;
 use C4::SMS;
+use Carp;
 use utf8;
 my ($res,$ua);##variables for SMS
 
@@ -309,8 +312,7 @@ sub sendEmail {
 
                 
        if (not(sendmail %mail)) {       
-warn  $Mail::Sendmail::error;
-               warn "sendEmail to $to failed.";
+carp  "sendEmail to $to failed: " . $Mail::Sendmail::error;
                return 0;       
        }