Beispiel #1
0
 private static void MoveMessageToFolder(EWSIncomingMessage ewsMessage, Folder rogueMessageFolder)
 {
     try
     {
         Logger.InfoFormat("Moving mail item to '{0}' folder.", rogueMessageFolder.DisplayName);
         ewsMessage.MoveMessage(rogueMessageFolder.Id);
     }
     catch (Exception)
     {
         Logger.ErrorFormat(
             "Failed to move message to '{0}' folder. Possible cause: original mail item moved by the Exchange Server rules.",
             rogueMessageFolder.DisplayName);
     }
 }
 private static void MoveMessageToFolder(EWSIncomingMessage ewsMessage, Folder rogueMessageFolder)
 {
     try
     {
         Logger.InfoFormat("Moving mail item to '{0}' folder.", rogueMessageFolder.DisplayName);
         ewsMessage.MoveMessage(rogueMessageFolder.Id);
     }
     catch (Exception)
     {
         Logger.ErrorFormat(
             "Failed to move message to '{0}' folder. Possible cause: original mail item moved by the Exchange Server rules.",
             rogueMessageFolder.DisplayName);
     }
 }
 /// <summary>
 /// Process a single message based on whether it was processed successfully or not
 /// </summary>
 public void Process(EWSIncomingMessage message, bool successful)
 {
     var destination = successful ? _successFolderId : _failureFolderId;
     message.MoveMessage(destination);
 }
        /// <summary>
        /// Process a single message based on whether it was processed successfully or not
        /// </summary>
        public void Process(EWSIncomingMessage message, bool successful)
        {
            var destination = successful ? _successFolderId : _failureFolderId;

            message.MoveMessage(destination);
        }