I have a script to send emails with an embedded image and an html body, but when I try to send additional files, they are overwritten, this is my perl code
push @parts,
Email::MIME->create(
attributes => {
content_type => $CtypeB,
encoding => $EncodingB,
charset => $CharsetB,
},
body => $BodyB,
),
;
push @parts,
Email::MIME->create(
header_str=> [
'Content-ID' => $Content_ID,
],
attributes => {
content_type => $CtypeF,
encoding => $EncodingF,
'Content-Disposition' => $ContentD,
filename=> $FilenameF,
file => $FileF,
},
body => io($BodyF)->binary->all,
);
Email::MIME->create(
header_str => [
To => $Para,
From => $De,
Subject => $Asunto,
Cc => $Cc,
Bcc => $Bcc
],
attributes => {
content_type =>$CtypeH
},
parts => [@parts]
),
I assumed that being the elements of Email :: MIME created in arrangements these would be accommodated using push, however when I send the mail by adding several files, it is overwritten, that is, it sends the last attached file, any ideas or suggestions on what am I doing wrong ?, thanks.