Bugzilla – Attachment 113736 Details for
Bug 26922
SendAlerts does not correctly handle error on sending emails
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26922: Correctly handle email sending error from SendAlerts
Bug-26922-Correctly-handle-email-sending-error-fro.patch (text/plain), 1.46 KB, created by
Jonathan Druart
on 2020-11-17 15:08:31 UTC
(
hide
)
Description:
Bug 26922: Correctly handle email sending error from SendAlerts
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-11-17 15:08:31 UTC
Size:
1.46 KB
patch
obsolete
>From 636caec269e471cced4fb15e0cc7f7eeca83bc8f Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 17 Nov 2020 16:07:51 +0100 >Subject: [PATCH] Bug 26922: Correctly handle email sending error from > SendAlerts > >--- > C4/Letters.pm | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > >diff --git a/C4/Letters.pm b/C4/Letters.pm >index d3e354f6c6..94d5cf7b00 100644 >--- a/C4/Letters.pm >+++ b/C4/Letters.pm >@@ -357,13 +357,15 @@ sub SendAlerts { > $mail->text_body( $letter->{content} ); > } > >+ my $error; > try { > $mail->send_or_die({ transport => $library->smtp_server->transport }); > } > catch { > carp "$_"; >- return { error => "$_" }; >+ $error = $_; > }; >+ return { error => $error } if $error; > } > } > elsif ( $type eq 'claimacquisition' or $type eq 'claimissues' or $type eq 'orderacquisition' ) { >@@ -511,13 +513,15 @@ sub SendAlerts { > $mail->text_body( "" . $letter->{content} ); > } > >+ my $error; > try { > $mail->send_or_die({ transport => $library->smtp_server->transport }); > } > catch { > carp "$_"; >- return { error => "$_" }; >+ $error = $_; > }; >+ return { error => $error } if $error; > > logaction( > "ACQUISITION", >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 26922
:
113736
|
113828
|
113849
|
113870
|
113884
|
113894
|
113895