@@ -, +, @@ template does not exist Bug 14133: Print notices should be generated with the print template - Remove the print template for the letter you use for overdues - Define an overdue rule to send an email - Remove the email address for the patron which has overdues - Execute the overdue_notices script --- misc/cronjobs/overdue_notices.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) --- a/misc/cronjobs/overdue_notices.pl +++ a/misc/cronjobs/overdue_notices.pl @@ -675,6 +675,8 @@ END_SQL # email or sms is requested but not exist, do a print. $effective_mtt = 'print'; } + + my $letter_exists = C4::Letters::getletter( 'circulation', $overdue_rules->{"letter$i"}, $branchcode, $effective_mtt ) ? 1 : 0; my $letter = parse_overdues_letter( { letter_code => $overdue_rules->{"letter$i"}, borrowernumber => $borrowernumber, @@ -685,7 +687,9 @@ END_SQL 'items.content' => $titles, 'count' => $itemcount, }, - message_transport_type => $effective_mtt, + # If there is no template defined for the requested letter + # Fallback on email + message_transport_type => $letter_exists ? $effective_mtt : 'email', } ); unless ($letter) { --