In the code window, replace the code with the following:
using System;
using System.Reflection;
namespace WebDav
{
   class Class1
   {   
      public static void Main(String [] args)
      {
         try 
         {
            MSXML2.XMLHTTP30 oXMLHttp = new MSXML2.XMLHTTP30();
            //TODO : Replace with source URL and the destination URL.
            String sSourceURL = "http://ExchServer/Public/MyFolder1/Test.eml";
            String sDestinationURL = "http://ExchServer/Public/MyFolder2/Test.eml";
            // COPY
            // TODO: Replace the credentials
            oXMLHttp.open("COPY", sSourceURL, false, @"UserDomain\UserAlias", "UserPassword");
            // MOVE
            // TODO: Replace the credentials
            //oXMLHttp.open("MOVE", sSourceURL, false, @"UserDomain\UserAlias", "UserPassword");
            oXMLHttp.setRequestHeader("Destination", sDestinationURL);
            oXMLHttp.send(Missing.Value);
            Console.WriteLine(oXMLHttp.status);
            Console.WriteLine(oXMLHttp.statusText);
            Console.WriteLine(oXMLHttp.responseText);
         
            oXMLHttp = null;
         }
         catch (Exception e)
         {
            Console.WriteLine("{0} Exception caught.", e);
         }
      }
   }
} |