M
Michael Yang
I'm working on parsing multiple messages out of one msf file(mbox
folder type).
I took the module of Email::Folder to construct with msf file, and
then get the list of all messages contained in the msf file.
But, the msf file is considered as a wholly one message, not multiple
messages (actually I have multiple messages within the msf file)
Here is my code snippet:
my $folder = Email::Folder->new($file); //$file is a valid mbox
folder type
foreach ($folder->messages){
print $_->header("Subject"), "\n";
print $_->as_string(), "\n";
//$imapserver->append($box, $_->as_string()); // i want to import
this message to my $imapserver, you can comment this one.
}
The result is:
The first print prints only the first message's subject.
The second print prints all the messages(all of the other messages) in
the msf file as a whole one.
The Email::Folder parses this file as one mail message.
Doesn't $folder->messages return a list of messages?
Is there any where I missed to set the preference of parsing rule?
Thanks.
folder type).
I took the module of Email::Folder to construct with msf file, and
then get the list of all messages contained in the msf file.
But, the msf file is considered as a wholly one message, not multiple
messages (actually I have multiple messages within the msf file)
Here is my code snippet:
my $folder = Email::Folder->new($file); //$file is a valid mbox
folder type
foreach ($folder->messages){
print $_->header("Subject"), "\n";
print $_->as_string(), "\n";
//$imapserver->append($box, $_->as_string()); // i want to import
this message to my $imapserver, you can comment this one.
}
The result is:
The first print prints only the first message's subject.
The second print prints all the messages(all of the other messages) in
the msf file as a whole one.
The Email::Folder parses this file as one mail message.
Doesn't $folder->messages return a list of messages?
Is there any where I missed to set the preference of parsing rule?
Thanks.