He don't work ...#!/usr/bin/perl $homedir='/home/celflog/www/teste'; use Mail::POP3Client; use IO::File; use Mail::Message::Attachment::Stripper; $pop = new Mail::POP3Client( USER => 'myuser', PASSWORD => "mypass", HOST => "mail.server.com" ); $msg=$pop->Retrieve(1); print "$msg"; $m = Mail::Message::Attachment::Stripper->new($msg); @attachments = $m->attachments; foreach $a(@attachments) { next if $a->{content_type} !~ /jpeg|jpg/i; # Ignore invalids attached files $f = new IO::File "$homedir" . $a->{filename}, "w" or die "Can not +create file!"; print $f $a->{payload}; }
20061227 Janitored by Corion: Added code tags as per Writeup Formatting Tips
In reply to Geting attached files of emails (POP3) by MiDgArD
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |