jc23 has asked for the wisdom of the Perl Monks concerning the following question:
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Playing with attachments
by liz (Monsignor) on Jul 29, 2003 at 21:13 UTC | |
|
Re: Playing with attachments
by jc23 (Acolyte) on Jul 29, 2003 at 21:46 UTC | |
by liz (Monsignor) on Jul 29, 2003 at 21:59 UTC |