EWS Managed API Trace Listener

MSDN has some sample code showing how to implement a trace listener for the EWS Managed API (which is crucial for debugging EWS applications).  However, the sample trace listener isn’t actually very good for a variety of reasons (it creates different files for each trace type, and will actually overwrite the previous trace if the…


EWS: How to send signed email using the EWS Managed API

A question that keeps popping up is how to send signed or encrypted email using EWS.  A colleague (thank-you Vladimir!) has recently put together some sample code showing how to do exactly that using the EWS Managed API.  Based on his sample code, I’ve been able to partially complete my Windows Forms application that shows how…


EWS: Update Out-of-Office (OOF) sample application

This sample program shows how the OOF message can be manipulated using the EWS Managed API.  Full source (Visual Studio 2013) is included, and the program can be run from the command-line (so can be incorporated into scripts) or with UI.  When run from the Visual Studio IDE, the UI will be shown and any…


EWS: Hide a named folder in multiple mailboxes

Recently we’ve had a couple of requests that involved deleting or hiding mailbox folders that are created automatically either by Outlook or Lync.  Deleting such folders is usually both not supported and also not possible – they will most likely be marked as distinguished folders, which means that they can’t be deleted.  If you do…

0

EWS: Streaming Notification Sample

To complete my unintentional series on EWS notifications, I have written a sample application showing how to deal with streaming subscriptions.  The application includes full logging of both events and EWS calls, so is very useful for troubleshooting.  The screenshot below shows the application in action.   Streaming notifications are fully implemented in the EWS…

2

Transport Agent: Remove extra prefixes from email subject

If you regularly send email internationally, you may notice an issue that crops up in email conversations between two locales where the “Re.” prefix differs.  Basically, each time the message is replied to, another Re. (or Aw., Antwort, etc.) is tagged on to the beginning of the Subject.  This is more noticeable when an email…

0

Outlook Code: BeforeItemMove event not being triggered for all the folders

We have recently had a case where the BeforeItemMove event wasn’t being triggered when switching between two calendar folders in Outlook 2007 or 2010.   To subscribe for the event we were using the Outlook.Explorer.CurrentFolder property to retrieve the currently selected folder and that same object was being used for subscribing for the events.  …

0

Drag and Drop from Outlook 2010 (Part 2 – Windows Forms Application)

As described in a previous blog, there is unfortunately a known issue with drag/drop and Outlook 2010.  The previous blog describes the issue and also demonstrates a workaround that can be used when needing to implement drag/drop in an Outlook add-in.  A recent case highlighted another scenario in which the issue occurs, though – if…

2

MAPI Application: How to programmatically create a blank MAPI profile

Note: You need to use the Outlook MAPI header files with this code.   1: // MAPICreateBlankProfile.cpp : Defines the entry point for the console application. 2: // 3:  4: #include "stdafx.h" 5: #include <iostream> 6: #include <InitGuid.h> 7: #define USES_IID_IMAPIProp 8: #include <wchar.h> 9: #include <winerror.h> 10: #include <Mapix.h> 11: #include <mapiutil.h> 12: #include…

0