I believe you can use OLE on it's own - it should be self-sufficient. I assume that your problem is reading the mail as soon as it arrives. Have you had a look at the Inspector object in Outlook ? It could be very useful since it allows you to find different items, then what you could do is have a permanent scan (for example every minute) and check whether new items have come in the inbox (provided there are no rules sending mail to other folders). You can also check whether these items are emails with the following :
if ( my $outlook = Win32::OLE->GetActiveObject('Outlook.Application')) +# connect to outlook application { # next line for debug only # print "\nSuccessfully connected to existing outlook & email"; + if (defined ($outlook->ActiveInspector())) { my $activeEmail= $outlook->ActiveInspector()->{CurrentItem}; if ($activeEmail->{Class}==olMail) # if we're dealing with an + email item { print "ok it's a mail"; } } }

This code analyses the currently open item, but it's very easy to make it scan the entire inbox, make it build a hash and each time you scan the inbox you can check to see which mails are new (not unread only new). You can then append these new mails to your hash and use the hash to generate your webpage.
If you want to run your code at a specific time, why not check the system's time, and compare it to the desired time of execution ?
Heureux qui, comme Ulysse, a fait un beau voyage
Ou comme celui-là qui conquit la Toison,
Et puis est retourné plein d'usage et raison,
Vivre entre ses parents le reste de son âge!

J. du Bellay, poëte angevin


In reply to Re: Mail & Win32 by Foggy Bottoms
in thread Mail & Win32 by Mitch

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.