Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Your exchnage sever may have POP3 mail box access set up. If it has it's fairly easy to get Mail::POP3Client to grab the mail. I've had to do this recently:
#!c:\strawberry\perl\bin\perl.exe use Modern::Perl; use Mail::POP3Client; use MIME::QuotedPrint; my $pop_user = 'XXXXXXXXXX'; my $pop_pass = 'XXXXXXXXXX'; my $pop_host = 'exchange3'; #connect to POP3 sever my $pop = new Mail::POP3Client ( HOST => $pop_host ); $pop->User($pop_user); $pop->Pass($pop_pass); $pop->Connect() or die "Unable to connect to POP3 server: ".$pop->Message()."\n"; #count number of items in POP3 mailbox my $mailcount = $pop->Count(); for (my $i = 1; $i <= $mailcount ; $i++) { my $header = $pop->Head($i); #gets the header my $uni = $pop->Uidl($i); # gets the unquie id my $body = $pop->Body($i); $body = decode_qp($body); #decode quoted printable body say "$uni"; say "$header\n"; say "$body"; }
Edit 27/07/2011@10:33BST Removed reference to subroutine not include in code &return_error and replaced with die

In reply to Re^3: is it possible to use Perl to process Outlook emails? by cjb
in thread is it possible to use Perl to process Outlook emails? by mertserger

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (6)
As of 2022-05-16 14:55 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (63 votes). Check out past polls.