Any help WOULD BE GREATLY APPRECIATED !!!
* Here the problematic email: www.biospring.com/email
* Here is the problematic image output, both what it should be, and what MIME::Parser does to the image: www.biospring.com/email/emailimages.html
* Here is the code (just want to extract the email text body and any images):
sub parse { use MIME::Parser; my $dir = "c:\\tmp\\parsedemails"; if (not -d $dir) { mkdir $dir or die "Can't create directory $dir: $!\n"; } ### Create a new parser object: my $parser = new MIME::Parser; ### Tell it where to put things: $parser->output_under($dir); ### Open the file: open my $fh, '<', $fileopen or die "Can't read $filopen: $!\n"; ### Parse an input filehandle: my $entity = $parser->parse($fh); # $entity->dump_skeleton; $path = "c:\\tmp\\parsedemails"; opendir(DIR, $path); @lines = readdir(DIR); closedir(DIR); ### the last directory name, is the name of the newly most recently cr +eated directory by Mail::Parser $directory = $lines[$#lines]; Print "DIR $directory END "; $pathdir = $path."\\".$directory; opendir(DIR, $pathdir) or die "can't opendir $pathdir: $!"; while (defined($file = readdir(DIR))) { push @files, $file; # Print " FILE $file END"."\n"; } closedir(DIR); } # end sub
In reply to MIME: Parser image decode sometimes doesnt work by gmarstead
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |