http://qs321.pair.com?node_id=277704


in reply to Sending email attachments

Have you considered Mail::Sender? Would give you a simpler and more portable way of doing what you want:
(new Mail::Sender)->MailFile({ smtp => "your.mailserver.com", from => $from_email, to => $to_email, subject => $subject, msg => $message, file => \@filelist });
@filelist is an array containing a list of file names to attach.

Cheers!
MrCromeDome