|
Lines 24-29
use Getopt::Long qw( GetOptions );
Link Here
|
| 24 |
use Pod::Usage qw( pod2usage ); |
24 |
use Pod::Usage qw( pod2usage ); |
| 25 |
use Carp qw( carp ); |
25 |
use Carp qw( carp ); |
| 26 |
use C4::Letters qw( GetPreparedLetter EnqueueLetter ); |
26 |
use C4::Letters qw( GetPreparedLetter EnqueueLetter ); |
|
|
27 |
use File::Basename qw( basename ); |
| 27 |
|
28 |
|
| 28 |
=head1 NAME |
29 |
=head1 NAME |
| 29 |
|
30 |
|
|
Lines 185-193
if ( $email ) {
Link Here
|
| 185 |
open my $fh, '<', $file; |
186 |
open my $fh, '<', $file; |
| 186 |
if ( |
187 |
if ( |
| 187 |
$sftp->put( |
188 |
$sftp->put( |
| 188 |
$fh, $file, |
189 |
$fh, basename($file) |
| 189 |
callback => sub { my ( $sftp, $data, $offset, $size ) = @_; warn "$offset of $size bytes transferred\n"; } |
190 |
) |
| 190 |
) |
|
|
| 191 |
) { |
191 |
) { |
| 192 |
# Send success email |
192 |
# Send success email |
| 193 |
$sftp_status = 'SUCCESS'; |
193 |
$sftp_status = 'SUCCESS'; |
| 194 |
- |
|
|