http://www.perlmonks.org?node_id=11122984


in reply to Trouble with sending more than one attachment

Where in your code is the loop where you loop over the contents of @files?

You may want something like:

for my $file (@files) { my $att_part = MIME::Lite::->new( 'Type' => 'application/octet-stream', 'Encoding' => 'base64', 'Path' => $file, ); $msg->attach($att_part); };

Replies are listed 'Best First'.
Re^2: Trouble with sending more than one attachment
by ytjPerl (Scribe) on Oct 19, 2020 at 18:57 UTC
    Tried. This does not work

      Maybe you want to tell us in what sense this does not work?

      I don't really know how it fails for you, so I don't know what you need to change.