I have hade some success readung folders and email with the library module Email::Folder::Exchange::EWS. What's missing from the module is the ability to delete a message -- although Exchange 2010 EWS has a web service 'DeleteItems'

I am good until I attempt to DeleteItems. Getting 'Can't locate object method "proxy" via package "Email::Simple" at c:/PerlNew/site/lib/SOAP/Lite.pm line 3774. ' Any help will result in a profusion of thanks <\p>

#!/usr/local/perl5/bin/perl -w use strict; use Email::Folder::Exchange::EWS; SOAP::Lite->import( +trace => 'all' ); my $folder = Email::Folder::Exchange::EWS->new('https://webmailNY.XX +XXXX.com:443/ews/exchange.asmx', 'domain\gsa_spectrum_mb_read', 'pass +word'); for my $message ($folder->messages) { print "subject: " . $message->header('Subject'); my $from_header = $message->header("From"); my @header_names = $message->header_names; my $header = $message->header_obj; my $message_id = $message->header('Message-ID'); my $method = SOAP::Data->name('DeleteItems') ->attr({xmlns => 'https://webmailNY.XXXXXX.com/ews:443'}); my @params = ( SOAP::Data->name('Message-ID' => $message_id)); print $message-> SOAP::Lite::call($method => @params)->result; print 'end'; }

In reply to Deleting Exchange Email by martydavis

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.