in reply to [Resolved]Email::Mime 1 email + multiple attachments
recipient will not receive 1 e-mail with 3 attachments, but 3 e-mails with 1 attachment in each e-mail
That's not too surprising, as your foreach loop is around everything. Instead, create the list of attachments first, and then create one email to which you pass the list of attachments (@parts). I.e.
... my @parts; foreach (@files) { push @parts, Email::MIME->create( # attachments ... ); } $email = Email::MIME->create( # actual email ... parts => [ @parts ], ... ); ...
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Email::Mime 1 email + multiple attachments
by kazak (Beadle) on May 20, 2012 at 18:08 UTC | |
by Eliya (Vicar) on May 20, 2012 at 18:22 UTC | |
by kazak (Beadle) on May 20, 2012 at 18:30 UTC |