Skip to main content

Posts

Sending a No Reply, No ReplyAll, No Forward Email using EWS and Powershell

I've you haven't seen this before Gavin Smyth from Microsoft Research put together this cool VSTO plugin to allow you to send an Email from Outlook that will disable the Reply, ReplyAll and Forward Buttons on the Outlook ribbon  http://research.microsoft.com/en-us/projects/researchdesktop/noreplyall.aspx and the how to posts about the VSTO  http://blogs.msdn.com/b/gsmyth/archive/2011/09/18/noreply-vsto-add-in-wrap-up.aspx  . Note this only works in Outlook (not OWA or ActiveSync etc) but basically what a users would see when they receive a message is How this works is it sets the PidLidVerbStream Property on a message which is mostly documented in the http://msdn.microsoft.com/en-us/library/ee218541(v=exchg.80).aspx  protocol document. I say mostly because the format you get when using the methods from the NoReply Addin is a little different from the format documented which is for Voting buttons but its good enough to work with. The Verbs that this...

Creating a Mailbox alias usage report with EWS and Powershell

Before starting this one I want to point out the method I'm going to demonstrate in this post is not the best method to use to do this. If you have Message Tracking available then you can do this much more accurately using the Message tracking logs.  But if you don't have this available to you or you just want to see what you can do with EWS then this is the post for you. Many people have one or more email addresses assigned to their mailboxes (they get referred to using different names alias's, proxyaddress's, secondary address's, alternate address's etc) but in Outlook and OWA it can be hard to see what email address has been used to send you a mail because of the delivery process and the way the addresses are resolved. To get the actual email address a particular email was sent to one workaround you can use in EWS is to use the PidTagTransportMessageHeaders property and then parse the TO, CC and BCC Headers (note generally the BCC header won't be there ...

Sent and Received Time on a Message and EWS

This one has come up a couple of times for me over the last couple of weeks so I thought I'd put together a post to expand on the Subject a little. The easiest place to start before talking about Exchange is to look at a ordinary MIME message and its associated headers. In a MIME message there is one Message date  header  http://tools.ietf.org/html/rfc4021#section-2.1.1  which outlines " Specifies the date and time at which the creator of the message indicated that the message was complete and ready to enter the mail delivery system " which is a way of saying that its the Sent Time. eg In a Message Subject: Re: Oh no Date: Thu, 14 Aug 2014 18:44:52 +1000 Message-ID: < nk0h69wn6waj8s32rnc3kma0.1408005882691@email.android.com >  As the Message traverses various MTA's along the way to its final destinations, Received headers with dates are added to the Transport Headers  of a message indicating the date\time a particular MTA's...

Getting Folder Sizes and other Stats via EWS with Powershell

Somebody asked a question the other week about getting all the Folder Sizes via EWS which you can do easily using the PR_MESSAGE_SIZE_EXTENDED property and FindFolders operation (you can also get the folder size's using the Exchange Management Shell via Get-MailboxFolderStatistics cmdlet). But there is some other interesting stuff you can get via EWS that you can't from the EMS cmdlet such as the Default FolderClass (eg the PR_CONTAINER_CLASS_W http://msdn.microsoft.com/en-us/library/office/cc839839(v=office.15).aspx ) which will tell you what items are being stored in that particular Folder (although as documented it's not a mandatory property although its absence in the past has caused problem in OWA etc). Another property that looks interesting but doesn't seem to be well documented is the PR_ATTACH_ON_NORMAL_MSG_COUNT which appears to the be the total number of attachments on messages in that folder including seemly inline attachment (Note I can't confirm this a...
All sample scripts and source code is provided by for illustrative purposes only. All examples are untested in different environments and therefore, I cannot guarantee or imply reliability, serviceability, or function of these programs.

All code contained herein is provided to you "AS IS" without any warranties of any kind. The implied warranties of non-infringement, merchantability and fitness for a particular purpose are expressly disclaimed.