Hi, This is how i'm retrieving messages(code below). The text is fine it is perfectly downloading it. But for pictures attachment, the file has the size of the real picture, but I Can Not view the downloaded pictures. for example I'm sending picture aaa.jpg it is 16Kb. When I retrieve it i get 12321123-1233-aaa.jpg it is 16KB but I can not retrieve the pictures. any help is appreciated
awards open(CURRMSG, "C:\\currmsg.txt") or die "Cannot open message: $!\n"; my $uniq=time().'-'.$$; $entity=$parser->parse(\*CURRMSG); close CURRMSG; my @parts=$entity->parts; while(my $part = shift(@parts)) { if($part->parts) { push @parts,$part->parts; # Nested multi-part next; } my $filename=$part->head->recommended_filename; my $inputfile=$part->open("r"); open(F,"> $attachdir/$uniq-$filename.jpg"); while(read($inputfile,$buf,1024)) { print F $buf; } close(F); $inputfile->close; } -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]