Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Accessing IMAP-Server Outlook.office365.com via Perl

by NERDVANA (Acolyte)
on Sep 17, 2019 at 23:16 UTC ( #11106328=note: print w/replies, xml ) Need Help??

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);
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (9)
As of 2019-12-06 12:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Strict and warnings: which comes first?



    Results (155 votes). Check out past polls.

    Notices?