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 @no-spam>parts;
while(my $part = shift(@no-spam {
if($part->parts) {
push @no-spam>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;
}