From e63608ea4396bb0bf18a04e3120c64544f441d0f Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 27 Sep 2024 16:20:18 -0400 Subject: [PATCH] Bug 36766: (QA follow-up) Pass more variable to the template Libraries may want to use this for more varied purposes and adjust the language of the email based on the sftp upload that succeeded or failed. Signed-off-by: Kyle M Hall Signed-off-by: Katrin Fischer --- misc/cronjobs/sftp_file.pl | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/misc/cronjobs/sftp_file.pl b/misc/cronjobs/sftp_file.pl index f01cba8789..526f9d4882 100755 --- a/misc/cronjobs/sftp_file.pl +++ b/misc/cronjobs/sftp_file.pl @@ -195,9 +195,16 @@ if ( $sftp->put( $fh, basename($file) ) ) { if ($email) { $status_email = C4::Letters::GetPreparedLetter( module => 'commandline', - letter_code => "SFTP_$sftp_status", #SFTP_SUCCESS, SFTP_FAILURE + letter_code => "SFTP_$sftp_status", #SFTP_SUCCESS, SFTP_FAILURE message_transport_type => 'email', - substitute => { sftp_error => $sftp->error } + substitute => { + sftp_error => $sftp->error, + email => $email, + file => $file, + host => $host, + upload_dir => $upload_dir, + user => $user, + } ); C4::Letters::EnqueueLetter( -- 2.39.5