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 <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Kyle M Hall 2024-09-27 16:20:18 -04:00 committed by Katrin Fischer
parent fe3fc2cf4a
commit e63608ea43
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
1 changed files with 9 additions and 2 deletions

View File

@ -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(