Hi I am stuck, I have a gui interface that im setting up to send an automated email, from someone elses email address. I have the rights to send from the email address but when I go to run it it comes up with "Win32::OLE<0.1709> error 0x8002000e: Invalid number of parameters in PROPERTYPUT From at F:\Escalation.pl line 177 Here is the code
use Win32::OLE; use Win32::OLE qw(in with); use Win32::OLE::Variant; use Win32::OLE::Const 'Microsoft Outlook'; my $Outlook = Win32::OLE->GetActiveObject ('Outlook.Application') || Win32::OLE->new('Outlook.Application'); my $Outlook = new Win32::OLE('Outlook.Application'); # Create Mail Item my $item = $Outlook->CreateItem(0); # 0 = mail item. unless ($item) { die "Outlook is not running, cannot send mail.\n"; } $item->{'Subject'} = $mail_props{'subject'} || '[No Subject]'; $item->{'To'} = join (";", split(/[ ,;]+/, $mail_props{'to'})); $item->{'Body'} = $mail_props{'body'} || "\r\n"; $item->{'From'} = $mail_props{'to'}; # 2=high, 1=normal, 0=low $item->{'Importance'} = 1; # Send the Email $item->Send();
If you could help me that would be greatly appreciated.

In reply to Sending mail in outlook by DeliriumNZ

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.