Help for this page
use IO::All; # install this module first ... body => io($attachments{doc_name})->all, # add this line );
#print "error1 $!\n"; #print "error2 $Mail::Sendmail::error\n";