From 26afb8e7c0aad19b3d1262b78a3915beb55e9891 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Thu, 20 Jul 2023 14:11:22 +0000 Subject: [PATCH] Bug 33964: (QA follow-up) Handle absence of smtp server Resolve: Use of uninitialized value in hash element at /usr/share/koha/C4/Letters.pm line 1472. Use of uninitialized value in hash element at /usr/share/koha/C4/Letters.pm line 1473. Signed-off-by: Marcel de Rooy Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 5de1c66fe1a38aafaea690e5075b01b85e685f8e) Signed-off-by: Fridolin Somers --- C4/Letters.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/Letters.pm b/C4/Letters.pm index e190f90c08..e070697df4 100644 --- a/C4/Letters.pm +++ b/C4/Letters.pm @@ -1469,8 +1469,8 @@ sub _send_message_by_email { if !$message->{to_address} || $message->{to_address} ne $email->email->header('To'); - $smtp_transports->{ $smtp_server->id } ||= $smtp_server->transport; - my $smtp_transport = $smtp_transports->{ $smtp_server->id }; + $smtp_transports->{ $smtp_server->id // 'default' } ||= $smtp_server->transport; + my $smtp_transport = $smtp_transports->{ $smtp_server->id // 'default' }; try { $email->send_or_die({ transport => $smtp_transport }); -- 2.39.5