Is it possible read the Inbox Email inside the Tasks list with EWS API?

Hi everyone,

I'm using the EWS API to read the email from INBOX folder and the tasks from the TASKS folder.

But... in outlook desktop and web it's possible to "mark" an email and see that inside the TASKS list.

Can I do that with the API?

I tried to display all information details from ad email first and after "mark", but I didn't found something to use like a filter.

Someone can help me to do that?

Please...

Thank you so much!

Regards,

Christian

February 10th, 2015 12:08am

Marking an Email is generally just flagging it for followup what version of Exchange are you using ? You can mark an Email for followup using EWS for 2013 or Office 365 using the Flag class https://msdn.microsoft.com/en-us/library/microsoft.exchange.webservices.data.flag(v=exchg.80).aspx . Or you can use Extended properties on older versions see https://social.msdn.microsoft.com/Forums/exchange/en-US/8fccfcf9-e7ea-43b2-821d-2fb611855428/ews-managed-api-setting-followup-flags-consistent-with-outlook?forum=exchangesvrdevelopment

Cheers
Glen

Free Windows Admin Tool Kit Click here and download it now
February 11th, 2015 7:52am

Hi Glen,

first of all thank you so much for your answer.

Yeah, you gave me the correct way and I'm at half way.

Now I have the correct result with the property that I want.

The next step is use this value inside the filter.

I want to create 1 request with this filter and no have all items in answer... and use a "if" condition later.

For now, thank you, thank you so much!!!

Christian

  • Edited by Cricotti 8 hours 42 minutes ago edit
February 11th, 2015 6:35pm

Hi Glen,

I'm sorry, I have another question... I created the correct filter... but obviously the properties about the Tasks are different compare to messages.

I'm thinking to add the tasks properties to the messages with the same way.

My question is: for my filter I used the tag 0x1090.

Exist one list of all tags? I'm searching on google... but I'm not lucky for now :)

Thanks

Christian

Free Windows Admin Tool Kit Click here and download it now
February 11th, 2015 10:53pm

Hi Glen,

ok I change my question ;)

I need to fetch 3 field from a message item: dueDate, Status and Importance.

Unfortunately I tried with the same way that I used before, but I have this error:

"Custom properties cannot be specified using property tags.

The GUID and Id/Name combination must be used instead."

Can I ask your help?

Thanks!

Christian

February 11th, 2015 11:25pm

Hi Glen,

first of all thank you so much for your answer.

Yeah, you gave me the correct way and I'm at half way.

Now I have the correct result with the property that I want.

The next step is use this value inside the filter.

I want to create 1 request with this filter and no have all items in answer... and use a "if" condition later.

For now, thank you, thank you so much!!!

Christian

  • Edited by Cricotti Thursday, February 12, 2015 3:08 AM edit
Free Windows Admin Tool Kit Click here and download it now
February 12th, 2015 2:30am

Hi Glen,

first of all thank you so much for your answer.

Yeah, you gave me the correct way and I'm at half way.

Now I have the correct result with the property that I want.

The next step is use this value inside the filter.

I want to create 1 request with this filter and no have all items in answer... and use a "if" condition later.

For now, thank you, thank you so much!!!

Christian

  • Edited by Cricotti Thursday, February 12, 2015 3:08 AM edit
February 12th, 2015 2:30am

>> but obviously the properties about the Tasks are different compare to messages.

As per https://msdn.microsoft.com/en-us/library/office/cc842307(v=office.15).aspx "This property must not exist on a meeting-related object, and it should not exist on a task object."

For Tasks object you need to query the particular Task property your after eg TaskDue etc https://msdn.microsoft.com/en-us/library/ee218830(v=exchg.80).aspx

Cheers
Glen

Free Windows Admin Tool Kit Click here and download it now
February 13th, 2015 7:59am

Dear Glen, thank you gain for your answer.

I'm confuse about one thing:

If I "flag" an email, I can see that email inside the tasks list (outlook desktop and web), and if I debug the email details I can see 2 properties: 0x1090 (flagstatus) and 0x1095 (followup). And this it's perfect.

But if I "play" with this email inside the tasks list (outlook desktop and web), in same cases the 1090 and 1095 properties disappear...

So... if I don't have these properties, obviously I can not see that email inside my tasks list (script) because the "filter" is gone, but I can see that email inside the tasks list (outlook desktop and web).

Why???? Doesn't make any sense. Why the email stay in the list without the "flag" properties? I compared the email before and after... and the result it's only about these 2 fields. My only answer is: Outlook don't use a "flagstatus" to understand if an email is a task or not. But I don't know which another property use.

Dear Glen can you help me about that?

Thanks you so much.

Regards,

Christian

February 16th, 2015 12:55am

>>But if I "play" with this email inside the tasks list (outlook desktop and web), in same cases the 1090 and 1095 properties disappear...

That doesn't sound right to me, EWS will only return the properties you request it to return it sound like maybe your making a request without those properties requested. I would suggest you do some testing with a MAPI editor like Outlookspy or MFCMAPI (make sure whatever profile your using is in Online Mode not Cached). That will let you see directly what properties are changing (OutlookSpy is particular good a capturing the changes when an item is modified).

The To-Do task list in Outlook and OWA comes from querying the To-Do Search Folder which you can see the full list of properties this search folder uses documented in https://msdn.microsoft.com/en-us/library/ee203693(v=exchg.80).aspx it more complex then just those two properties you methioned and include props such as PidTagToDoItemFlags

Cheers
Glen

Free Windows Admin Tool Kit Click here and download it now
February 16th, 2015 8:19pm

Dear Glen, thank you.

Yes, I'm still using MFCMAPI and exactly with this tool I checked the 1090 and 1095 properties and with this tool I didn't found nothing about "0x0E2B"...

...BUT ... this is exactly what I looking for!!!! Now it works!

If in my filter I use: 0x0E2B = 1 and 0x1095 = exist I have exactly what I want!

Thank you sooo much!!! :)

Regards,

Christian


  • Edited by Cricotti 7 hours 25 minutes ago edit code
February 16th, 2015 9:53pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics