Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: How to get started with scraping my IMAP emails

by NERDVANA (Deacon)
on Feb 23, 2022 at 22:02 UTC ( [id://11141601]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
             my $p= MIME::Parser->new;
             $p->output_to_core(1);
             $p->parse($msg_or_fh);
    
  2. or download this
       # Find every MIME part which is not a container for other parts
       sub _leaf_parts {
    ...
          @parts? ( map { _leaf_parts() } @parts ) : ( $_ )
       }
       my @leaf_parts= map { _leaf_parts() } $email;
    
  3. or download this
       
       # Open a handle to each part which is an attachment
       my @attachments=
    ...
    
       # Convert zipfile attachments to the list of files within
       @attachments= map { $_->{name} =~ /\.zip$/? _extract_zipfile($_) : 
    +($_) } @attachments;
    
  4. or download this
    # Takes one file info, and returns a list of file infos for each file 
    +within the zip file.
    # Since these are not directly MIME parts, they are simply:
    ...
          if $status < 0;
       return @files;
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11141601]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2024-04-23 09:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found