Help for this page

Select Code to Download


  1. or download this
       my $conn= Net::IMAP::Simple->new(
          $host,
    ...
       $mbox= 'INBOX' unless defined $mbox and length $mbox and $mbox ne '
    +/';
       $conn->select($mbox)
          or _logcroak("Can't select folder $mbox");
    
  2. or download this
       $conn->select; # call select again to refresh message list
    
  3. or download this
       $msg_ids= [ $conn->search($imap_query) ];
    
  4. or download this
       for my $msgid (@$msglist) {
          $log->debug("Msg $msgid");
    ...
          my $head= MIME::Head->from_file(\join('', @$header_lines)) or di
    +e;
          ...
          # filtering code goes here, which inspects headers
    
  5. or download this
         # this is the code that pulls in the whole message
         my $fh= $conn->getfh($msgid) || \
    ...
         my $p= MIME::Parser->new;
         $p->output_to_core(1);
         return $p->parse($fh);