1> I want to embed below Perl script in BASH script, and the Message should read from a message.txt file. How to realize this?
use Mail::Sendmail;
%mail = ( To => 'you@there.com',
From => 'me@here.com',
Message => "This is a very short message"
);
sendmail(%mail) or die $Mail::Sendmail::error;
print "OK. Log says:\n", $Mail::Sendmail::log;
2> How to attach log files via Perl script?