Home All Groups Group Topic Archive Search About

Changing Mail Received Date via EWS

Author
7 Jun 2009 3:45 PM
Terence
Hi all

Is there anyway to change the mail message's received date using EWS?

Tried looking at extended properties but doesnt seen to have anything on it.

Any help is greatly appreciated.  Thanks!
Author
8 Jun 2009 6:17 AM
Glen Scales [MVP]
You can change the Client Submit time  by modifying it via Extended
properties eg

ExtendedPropertyType msClientSubmit = new ExtendedPropertyType();
PathToExtendedFieldType epExPathcs = new PathToExtendedFieldType();
epExPathcs.PropertyType = MapiPropertyTypeType.SystemTime;
epExPathcs.PropertyTag = "0x0039";
msClientSubmit.ExtendedFieldURI = epExPathcs;
msClientSubmit.Item = "2008-10-10T01:00:00Z";

You can't change the PR_Creation time and you do need to be careful if you
are going to change the Submit time (received time) as sometimes these
properties can affect archiving systems etc.

Cheers
Glen


Show quoteHide quote
"Terence" <helpme***@hotmail.com> wrote in message
news:eJOOPc45JHA.3856@TK2MSFTNGP05.phx.gbl...
> Hi all
>
> Is there anyway to change the mail message's received date using EWS?
>
> Tried looking at extended properties but doesnt seen to have anything on
> it.
>
> Any help is greatly appreciated.  Thanks!
>
Are all your drivers up to date? click for free checkup

Author
8 Jun 2009 6:25 AM
Glen Scales [MVP]
You can also do the same with the PR_MESSAGE_DELIVERY_TIME using a slightly
different property depends if you want to do this on Sent or Recieved
messages but you may need to use both.eg

ExtendedPropertyType msRecived = new ExtendedPropertyType();
PathToExtendedFieldType epExPathcs = new PathToExtendedFieldType();
epExPathcs.PropertyType = MapiPropertyTypeType.SystemTime;
epExPathcs.PropertyTag = "0x0E06";
msRecived.ExtendedFieldURI = epExPathcs;
msRecived.Item = "2008-10-10T01:00:00Z";

Cheers
Glen


PR_MESSAGE_DELIVERY_TIME
Show quoteHide quote
"Glen Scales [MVP]" <gsca***@outlookexchange.com> wrote in message
news:OV9xDDA6JHA.6136@TK2MSFTNGP03.phx.gbl...
> You can change the Client Submit time  by modifying it via Extended
> properties eg
>
> ExtendedPropertyType msClientSubmit = new ExtendedPropertyType();
> PathToExtendedFieldType epExPathcs = new PathToExtendedFieldType();
> epExPathcs.PropertyType = MapiPropertyTypeType.SystemTime;
> epExPathcs.PropertyTag = "0x0039";
> msClientSubmit.ExtendedFieldURI = epExPathcs;
> msClientSubmit.Item = "2008-10-10T01:00:00Z";
>
> You can't change the PR_Creation time and you do need to be careful if you
> are going to change the Submit time (received time) as sometimes these
> properties can affect archiving systems etc.
>
> Cheers
> Glen
>
>
> "Terence" <helpme***@hotmail.com> wrote in message
> news:eJOOPc45JHA.3856@TK2MSFTNGP05.phx.gbl...
>> Hi all
>>
>> Is there anyway to change the mail message's received date using EWS?
>>
>> Tried looking at extended properties but doesnt seen to have anything on
>> it.
>>
>> Any help is greatly appreciated.  Thanks!
>>
>
>

Bookmark and Share