Previously, I was trying to send a directory of mail at once. With help from you guys, I ended up with:
This segment properly sends mail with contents from various mail files in the folder, however, if the original mail file contains an attachment, the attachment is not shown. Although $dirContent is an mail file to begin with, I think I still need to implement some kind of parsing from $dirContent to extract the attachment file and reattach it separately. I'm not sure how to do this using MIME::Lite and Mail::Audit. Could someone please give me some suggestions?foreach my $dirContent ( @dirContents ) { #mail contents and attachment open (MESSAGE, "$dirContent"); my @message = <MESSAGE>; my $msg = MIME::Lite->new( From => $sender, To => $recipient, Subject => $dirContent, Data => \@message, Type =>'multipart/mixed' ); close ( MESSAGE ); $msg->send; } closedir ( CHANGEME ); exit (0);
Thanks
jc
In reply to Playing with attachments by jc23
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |