X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=misc%2Fcronjobs%2Fsmsoverdues.pl;h=6415eb67411324f90b617f81052a3dc5a3782d16;hb=31a0ed0a43bb4ecfde0b762eb6e654c51da6f66e;hp=52a131909afb779109795ef348342dc1680dae6c;hpb=8619dfc0e2d2e8e4fa4fc886a8a6b5835fd067d8;p=koha_fer diff --git a/misc/cronjobs/smsoverdues.pl b/misc/cronjobs/smsoverdues.pl index 52a131909a..6415eb6741 100755 --- a/misc/cronjobs/smsoverdues.pl +++ b/misc/cronjobs/smsoverdues.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/perl # This script loops through each overdue item, determines the fine, # and updates the total amount of fines due by each user. It relies on @@ -21,22 +21,32 @@ # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # -# You should have received a copy of the GNU General Public License along with -# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, -# Suite 330, Boston, MA 02111-1307 USA +# You should have received a copy of the GNU General Public License along +# with Koha; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # $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 + use FindBin; + eval { require "$FindBin::Bin/../kohalib.pl" }; +} + 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 @@ -302,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; }