@@ -, +, @@ template mtt=email with the email template used mtt=sms with the sms template used mtt=print with the email template used mtt=print with the email template used (or sms I suppose) --- misc/cronjobs/overdue_notices.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) --- a/misc/cronjobs/overdue_notices.pl +++ a/misc/cronjobs/overdue_notices.pl @@ -674,6 +674,10 @@ END_SQL my $print_sent = 0; # A print notice is not yet sent for this patron for my $mtt ( @message_transport_types ) { + if ( ($mtt eq 'email' and not scalar @emails_to_use) or ($mtt eq 'sms' and not $data->{smsalertnumber}) ) { + # email or sms is requested but not exist, do a print. + $mtt = 'print'; + } my $letter = parse_overdues_letter( { letter_code => $overdue_rules->{"letter$i"}, borrowernumber => $borrowernumber, @@ -726,8 +730,6 @@ END_SQL ); } else { if ( ($mtt eq 'email' and not scalar @emails_to_use) or ($mtt eq 'sms' and not $data->{smsalertnumber}) ) { - # email or sms is requested but not exist, do a print. - $mtt = 'print'; push @output_chunks, prepare_letter_for_printing( { letter => $letter, --