Esempio n. 1
0
 // If the item is not a MailItem then we need to resolve the type and submit the item
 private void SubmitOther(dynamic item)
 {            
     try
     {
         var mapiObject = item.MAPIOBJECT;
         using (new ComRelease(mapiObject))
         {
             var messageUtils = new OutlookAddinLib.MessageUtils();
             messageUtils.SubmitMessage(mapiObject);
         }
     }
     catch (Exception ex)
     {
         Logger.LogError(ex);
         Logger.LogError("Failed to submit mail item. Item will remail in the Outbox.");
     }
 }
Esempio n. 2
0
 // The caller is responsable to release the MailItem COM object
 private void SubmitMail(Microsoft.Office.Interop.Outlook.MailItem mailItem)
 {
     var messageUtils = new OutlookAddinLib.MessageUtils();
     var mapiObject = mailItem.MAPIOBJECT;
     using (new ComRelease(mapiObject))
     {
         messageUtils.SubmitMessage(mapiObject);
     }
 }