in reply to Re^3: Trouble emailing zip file
in thread Trouble emailing zip file
open(FILE, '<', $attachment) or die "Cannot open $attachment: $!";
You most likely want binmode:
open(FILE, '<', $attachment) or die "Cannot open $attachment: $!"; binmode FILE; ...
Also, you want to eliminate the use of `basename...` in favour of File::Basename::basename:
use File::Basename 'basename';
Also, please consider using a module to send mail, like MIME::Lite instead of talking to sendmail directly...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Trouble emailing zip file
by TonyNY (Beadle) on Jul 05, 2018 at 19:46 UTC | |
by Corion (Patriarch) on Jul 05, 2018 at 19:56 UTC |