...just hazarding a guess, based on the fact that the you are using threads, and the error message....

it seems line35 is Can't call method "Messages" on an undefined value... and what might that value be?..... i can't be sure it's line 35, but it looks like

# Create a new message $msg = $session->Outbox->Messages->Add();
...so it seems that either $session is not shared (i.e. available in the thread )...or...$session->Outbox is not returning what you think with the new Outlook version try:
print "$session, $session->Outbox\n"; $msg = $session->Outbox->Messages->Add();
.... some possible things to watch for?..... $session->Outbox is now returning an array or something different from the earlier version..... or the new Outlook isn't thread safe, or something ..... by the way, the code looks like complete crap as far as thread variable management goes.....you seem to rely on being able to make $session a global object, and hoping the global nature extends into the thread..... the fact it even worked earlier is surprising..... but i don't do win32....so i just observe

I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku

In reply to Re^3: Send Outlook 2007 email by zentara
in thread Send Outlook 2007 email by meredib

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.