From e57768781c202d8de399ec8e656ec7edc12635b0 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 --- 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 f01cba8789b..526f9d48829 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 (Apple Git-154)