From fda94ecf8d8d167d2efc89a2d50d012258789f8a 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 --- C4/Letters.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/C4/Letters.pm b/C4/Letters.pm index 0b04354f83..62579eb049 100644 --- a/C4/Letters.pm +++ b/C4/Letters.pm @@ -458,7 +458,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 }; } @@ -603,7 +603,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 }; } @@ -652,7 +652,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 }; } @@ -1401,7 +1401,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.11.0