View | Details | Raw Unified | Return to bug 3810
Collapse All | Expand All

(-)a/basket/sendbasket.pl (-1 / +2 lines)
Lines 20-25 use warnings; Link Here
20
20
21
use CGI;
21
use CGI;
22
use Encode qw(encode);
22
use Encode qw(encode);
23
use Carp;
23
24
24
use Mail::Sendmail;
25
use Mail::Sendmail;
25
use MIME::QuotedPrint;
26
use MIME::QuotedPrint;
Lines 164-170 END_OF_BODY Link Here
164
    }
165
    }
165
    else {
166
    else {
166
        # do something if it doesnt work....
167
        # do something if it doesnt work....
167
        warn "Error sending mail: $Mail::Sendmail::error \n";
168
        carp "Error sending mail: $Mail::Sendmail::error \n";
168
        $template->param( error => 1 );
169
        $template->param( error => 1 );
169
    }
170
    }
170
    $template->param( email_add => $email_add );
171
    $template->param( email_add => $email_add );
(-)a/misc/cronjobs/notifyMailsOp.pl (-6 / +7 lines)
Lines 1-6 Link Here
1
#!/usr/bin/perl
1
#!/usr/bin/perl
2
use strict;
2
use strict;
3
#use warnings; FIXME - Bug 2505
3
#use warnings; FIXME - Bug 2505
4
use Carp;
4
BEGIN {
5
BEGIN {
5
    # find Koha's Perl modules
6
    # find Koha's Perl modules
6
    # test carefully before changing this
7
    # test carefully before changing this
Lines 201-212 foreach my $num (@getnofifys) { Link Here
201
								'content-type' => 'text/html; charset="utf-8"',
202
								'content-type' => 'text/html; charset="utf-8"',
202
					);
203
					);
203
				# if we don't have any content for the mail, we don't launch mail, but notify it in a file
204
				# if we don't have any content for the mail, we don't launch mail, but notify it in a file
204
					if ($mailtext ne 'nonotifys') {
205
                if ($mailtext ne 'nonotifys') {
205
					sendmail(%mail);
206
                    sendmail(%mail) or carp $Mail::Sendmail::error;
206
					}
207
                }
207
					else {
208
                else {
208
					print OUT $email ;
209
                    print OUT $email ;
209
					}
210
                }
210
					
211
					
211
# now deal with the debarred mode
212
# now deal with the debarred mode
212
#		if ($debarred eq 1) {
213
#		if ($debarred eq 1) {
(-)a/misc/cronjobs/runreport.pl (-2 / +3 lines)
Lines 28-33 use Pod::Usage; Link Here
28
use Mail::Sendmail;
28
use Mail::Sendmail;
29
use Text::CSV_XS;
29
use Text::CSV_XS;
30
use CGI;
30
use CGI;
31
use Carp;
31
32
32
use vars qw($VERSION);
33
use vars qw($VERSION);
33
34
Lines 159-165 unless (scalar(@ARGV)) { Link Here
159
foreach my $report (@ARGV) {
160
foreach my $report (@ARGV) {
160
    my ($sql, $type) = get_saved_report($report);
161
    my ($sql, $type) = get_saved_report($report);
161
    unless ($sql) {
162
    unless ($sql) {
162
        warn "ERROR: No saved report $report found";
163
        carp "ERROR: No saved report $report found";
163
        next;
164
        next;
164
    }
165
    }
165
    $verbose and print "SQL: $sql\n\n";
166
    $verbose and print "SQL: $sql\n\n";
Lines 188-194 foreach my $report (@ARGV) { Link Here
188
            Subject => $subject,
189
            Subject => $subject,
189
            Message => $message 
190
            Message => $message 
190
        );
191
        );
191
        sendmail(%mail) or warn "mail not sent";
192
        sendmail(%mail) or carp 'mail not sent:' . $Mail::Sendmail::error;
192
    } else {
193
    } else {
193
        print $message;
194
        print $message;
194
    }
195
    }
(-)a/misc/cronjobs/smsoverdues.pl (-3 / +2 lines)
Lines 40-52 BEGIN { Link Here
40
use C4::Context;
40
use C4::Context;
41
use C4::Search;
41
use C4::Search;
42
use C4::Circulation;
42
use C4::Circulation;
43
use C4::Circulation::Fines;
44
use C4::Members;
43
use C4::Members;
45
use C4::Dates qw/format_date/;
44
use C4::Dates qw/format_date/;
46
use HTML::Template::Pro;
45
use HTML::Template::Pro;
47
use Mail::Sendmail;
46
use Mail::Sendmail;
48
use Mail::RFC822::Address;
47
use Mail::RFC822::Address;
49
use C4::SMS;
48
use C4::SMS;
49
use Carp;
50
use utf8;
50
use utf8;
51
my ($res,$ua);##variables for SMS
51
my ($res,$ua);##variables for SMS
52
52
Lines 312-319 sub sendEmail { Link Here
312
312
313
                
313
                
314
	if (not(sendmail %mail)) {       
314
	if (not(sendmail %mail)) {       
315
warn  $Mail::Sendmail::error;
315
carp  "sendEmail to $to failed: " . $Mail::Sendmail::error;
316
		warn "sendEmail to $to failed.";
317
		return 0;	
316
		return 0;	
318
	}
317
	}
319
	
318
	
(-)a/opac/opac-sendbasket.pl (-1 / +2 lines)
Lines 20-25 use warnings; Link Here
20
20
21
use CGI;
21
use CGI;
22
use Encode qw(encode);
22
use Encode qw(encode);
23
use Carp;
23
24
24
use Mail::Sendmail;
25
use Mail::Sendmail;
25
use MIME::QuotedPrint;
26
use MIME::QuotedPrint;
Lines 170-176 END_OF_BODY Link Here
170
    }
171
    }
171
    else {
172
    else {
172
        # do something if it doesnt work....
173
        # do something if it doesnt work....
173
        warn "Error sending mail: $Mail::Sendmail::error \n";
174
        carp "Error sending mail: $Mail::Sendmail::error \n";
174
        $template->param( error => 1 );
175
        $template->param( error => 1 );
175
    }
176
    }
176
    $template->param( email_add => $email_add );
177
    $template->param( email_add => $email_add );
(-)a/opac/opac-sendshelf.pl (-1 / +2 lines)
Lines 22-27 use warnings; Link Here
22
22
23
use CGI;
23
use CGI;
24
use Encode qw(encode);
24
use Encode qw(encode);
25
use Carp;
25
26
26
use Mail::Sendmail;
27
use Mail::Sendmail;
27
use MIME::QuotedPrint;
28
use MIME::QuotedPrint;
Lines 162-168 END_OF_BODY Link Here
162
    }
163
    }
163
    else {
164
    else {
164
        # do something if it doesnt work....
165
        # do something if it doesnt work....
165
        warn "Error sending mail: $Mail::Sendmail::error \n";
166
        carp "Error sending mail: $Mail::Sendmail::error \n";
166
        $template->param( error => 1 );
167
        $template->param( error => 1 );
167
    }
168
    }
168
169
(-)a/virtualshelves/sendshelf.pl (-2 / +2 lines)
Lines 22-27 use warnings; Link Here
22
22
23
use CGI;
23
use CGI;
24
use Encode qw(encode);
24
use Encode qw(encode);
25
use Carp;
25
26
26
use Mail::Sendmail;
27
use Mail::Sendmail;
27
use MIME::QuotedPrint;
28
use MIME::QuotedPrint;
Lines 157-163 END_OF_BODY Link Here
157
    }
158
    }
158
    else {
159
    else {
159
        # do something if it doesnt work....
160
        # do something if it doesnt work....
160
        warn "Error sending mail: $Mail::Sendmail::error \n";
161
        carp "Error sending mail: $Mail::Sendmail::error \n";
161
        $template->param( error => 1 );
162
        $template->param( error => 1 );
162
    }
163
    }
163
164
164
- 

Return to bug 3810