From 3bb4cd2e5b8cd918922aaf2db5c4b60117c894c5 Mon Sep 17 00:00:00 2001 From: Mark Tompsett Date: Mon, 26 Mar 2018 16:46:19 +0000 Subject: [PATCH] Bug 20474: Explicitly call sendmail to make mocking work Signed-off-by: Jonathan Druart Signed-off-by: Jonathan Druart Signed-off-by: Nick Clemens --- C4/Letters.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/C4/Letters.pm b/C4/Letters.pm index 7e22498535..983e32391c 100644 --- a/C4/Letters.pm +++ b/C4/Letters.pm @@ -455,7 +455,7 @@ sub SendAlerts { : 'text/plain; charset="utf-8"', } ); - unless( sendmail(%mail) ) { + unless( Mail::Sendmail::sendmail(%mail) ) { carp $Mail::Sendmail::error; return { error => $Mail::Sendmail::error }; } @@ -600,7 +600,7 @@ sub SendAlerts { if C4::Context->preference("ClaimsBccCopy"); } - unless ( sendmail(%mail) ) { + unless ( Mail::Sendmail::sendmail(%mail) ) { carp $Mail::Sendmail::error; return { error => $Mail::Sendmail::error }; } @@ -649,7 +649,7 @@ sub SendAlerts { : 'text/plain; charset="utf-8"', } ); - unless( sendmail(%mail) ) { + unless( Mail::Sendmail::sendmail(%mail) ) { carp $Mail::Sendmail::error; return { error => $Mail::Sendmail::error }; } @@ -1398,7 +1398,7 @@ sub _send_message_by_email { _update_message_to_address($message->{'message_id'},$to_address) unless $message->{to_address}; #if initial message address was empty, coming here means that a to address was found and queue should be updated - if ( sendmail( %sendmail_params ) ) { + if ( Mail::Sendmail::sendmail( %sendmail_params ) ) { _set_message_status( { message_id => $message->{'message_id'}, status => 'sent' } ); return 1; -- 2.39.5