Your skill will accomplish what the force of many cannot |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
NEW CODE:
#!/usr/bin/perl
my $homedir='/home/celflog/www/teste'; use strict; use Mail::POP3Client; use IO::File; use Mail::Message::Attachment::Stripper; my $pop = new Mail::POP3Client( USER => 'myuser', PASSWORD => "mypass", HOST => "mail.server.com" ); my $msg=$pop->Retrieve(1), or die "$_\n"; print "$msg"; my $m = Mail::Message::Attachment::Stripper->new($msg); my @attachments = $m->attachments; foreach my $a(@attachments) { next if $a->{content_type} !~ /jpeg|jpg/i; # Ignore invalids attached files my $f = new IO::File "$homedir" . $a->{filename}, "w" or die "Can not create file!"; print $f $a->{payload}; } He continue showing: Need a message at teste.cgi line 25 In reply to Re^4: Geting attached files of emails (POP3)
by MiDgArD
|
|