roboticus,
I came to a similar idea based on a question posed by BrowserUk who asked if I was sure if the account the service was running as had sufficient privilages. While I was sure that it did, I wasn't sure it would attempt to access the correct mailbox. I haven't tried it yet, but I do have some updates to share.

The ActiveState PDK includes a tool called PerlSvc that does seem to work. It creates an "exe" and the service wraps around that. The price tag is steep ($195 or $295 for the pro edition). What I am unsure of is if it will work with Outlook when I am not logged in. The code tries to attach to an existing Outlook process before attempting to start a new instance. When I got what I believe to be a successful test run, I was already logged in with Outlook open so it really wasn't a complete test. I am using a 21 day trial for now while I test out a few other ideas.

While I haven't been able to get it to work, example 5 in the Win32::Daemon docs looks to be the simplest complete example that would make converting an existing application fairly trivial. I have gotten example 1 to work (minus Outlook) so it does look very promising assuming I can work out my Outlook issues.

If I find that the only stumbling block preventing my application to work as a service is interfacing Outlook (assuming I can't resolve those issues), then I will leave it up to the person in charge to decide on a solution. (run it as a scheduled task and not as a service, drop Outlook and move to POP/SMTP modules, pay for the PDK assuming a complete test works, fire me, etc).

Cheers - L~R


In reply to Re^2: Win32::OLE (Outlook) as a windows service by Limbic~Region
in thread Win32::OLE (Outlook) as a windows service by Limbic~Region

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.