locked
Fetch tasks and calendar appointments using IMAP RRS feed

  • Question

  • Dear Reader,

    I have a task to build a custom IMAP client that can connect to an exchange server. The connecting and fetching messages works flawless, but i cannot fetch appointments or tasks. 

    I am aware that the IMAP protocol does not support these kind of objects, but this question is kind of my last hope. 

    Now so far as i know, you can only get messages with the command FETCH. It is possible to get into the Tasks folder and i can see that there are messages :

    Note: it is a dutch server so "taken" stands for tasks ( obviously ).

    0000 SELECT Taken

    * 1 EXISTS
    * 0 RECENT
    * FLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)
    * OK [PERMANENTFLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)] Permanent flags
    * OK [UIDVALIDITY 2514] UIDVALIDITY value
    * OK [UIDNEXT 2] The next unique identifier value
    0000 OK [READ-WRITE] SELECT completed.

    Now i can enter the Tasks folder and there is an item in it ( i know already that the id of this item is 1 ). Now when i try to fetch the item: 
    Note: I made the task via the outlook web app and the task his subject is : "DITISEENTAAK" and the body of this is "DIT IS DE BODY VAN DE TASK"

    0000 FETCH 1 BODY[TEXT]

    * 1 FETCH (BODY[TEXT] {333}
    The server couldn't retrieve the following message:

    Subject: "DITISEENTAAAK" ( <<< Thi)
    From: "Not available" ("Not available")
    Sent date: 31-8-2012 16:02:29

    The message hasn't been deleted. You might be able to view it using either =
    Outlook or Outlook Web App. You can also contact the sender to find out wha=
    t the message says.=
     FLAGS (\Seen))
    0000 OK FETCH completed.

    This is the response i get from the server. I am getting the same response when fetching an appointment
    Now my question is of course, is there any way to fetch a task or appointment using IMAP? 

    Yes i am still aware that the IMAP server does not support these kind of messages. But if the server doesn't support it, then it's a bit strange the server shows the tasks folder as an available mailbox. 

    Please Please help =)

    Thanks in advance
    Roy

    PS: Sorry for the bad english, i hope it's readable! I'm dutch by the way.

    PPS: Its a test account so don't mind about the privacy thingies

    Monday, September 3, 2012 8:08 AM

Answers

  • Hi Roy,

    You wrote “the listing i get from the IMAP command "LIST "" * " . This commands returns all of the mailboxes … i consider this as a bug. I get a list of all the mailboxes through IMAP, these non-IMAP compatible mailboxes are also in this list”.
    This works as documented in [MS-STANXIMAP] — v20121003
    2.2.19 [RFC3501] Section 6.3.8, LIST Command
    ……….
    Microsoft Exchange does not hide any mailboxes from wildcard characters.

    The Exchange IMAP LIST command works as documented and there is no plan to change its behavior.

    Thanks, Vilmos

    • Marked as answer by Roysten Friday, November 16, 2012 12:34 PM
    Thursday, November 15, 2012 6:12 PM

All replies

  • Hi Roy,

    Thank you for your question. A member of the protocol documentation team will respond to you soon.

    Regards,
    Vilmos Foltenyi - MSFT

    Monday, September 3, 2012 9:01 AM
  • Hi Roy,

    I am the engineer who will be working with you on this issue. I am currently researching the problem and will provide you with an update soon.

    Regards,
    Vilmos Foltenyi - MSFT

    Wednesday, September 5, 2012 12:20 AM
  • Thank you Vilmos.

    I have tried fetching tasks with thunderbird or another IMAP client and it seems they cannot retrieve tasks or appointments either.

    Regards,

    Roy

    Wednesday, September 5, 2012 7:25 AM
  • Hi Vilmos,

    Is it possible to provide me with some information soon? 
    My company is eager to create an IMAP client that can connect with exchange and use all of its features.

    Thank you in advance

    Regards,

    Roy

    Thursday, September 13, 2012 8:59 AM
  • Hi Roy,

    Your English is very good, no problem to understand it. In your posting you wrote that you know IMAP doesn’t support fetching appointment and task; this is true. The Microsoft extensions found in [MS-OXIMAP4] doesn’t add these functionalities either.

    The Tasks folder is not treated as a regular folder, Outlook doesn’t displays it with the other folders, regardless that, e.g. the Inbox and the Tasks folders have the same parent. Perhaps you should consider to use another Exchange supported protocol.

    Thanks, Vilmos

    • Marked as answer by Roysten Wednesday, October 3, 2012 10:18 AM
    • Unmarked as answer by Roysten Wednesday, October 3, 2012 10:33 AM
    Thursday, September 20, 2012 7:01 PM
  • hai vilmos,

    i have a problem when i want to retrieve the email body in text/plain mode. it seems that when i use 

    FETCH 1 BODY[TEXT]

    it will return

    * 1 FETCH (FLAGS (\Seen) BODY[TEXT] {422}
    --_000_CAHmopKiOKuf3eFSmcLL6gBTTmFWZyNW8Q1hP1qZpgD4e4anQAmailg_
    Content-Type: text/plain; charset="iso-8859-1"
    Content-Transfer-Encoding: quoted-printable
    
    AAAAAAAAAAAA
    
    --_000_CAHmopKiOKuf3eFSmcLL6gBTTmFWZyNW8Q1hP1qZpgD4e4anQAmailg_
    Content-Type: text/html; charset="iso-8859-1"
    Content-Transfer-Encoding: quoted-printable
    
    AAAAAAAAAAAA<br>
    
    --_000_CAHmopKiOKuf3eFSmcLL6gBTTmFWZyNW8Q1hP1qZpgD4e4anQAmailg_--
     FLAGS (\Seen))

    how do i retrieve plain/text mode only??please help...i'm really stuck here...

    Tuesday, October 2, 2012 9:39 PM
  • Hi eveniza,

    It is possible to get the real data part of a mime message part. 

    In this case it will be the command FETCH 1 BODY[1] 

    To grab the text/html part the command will be FETCH 1 BODY[2]

    It is useful to study the command FETCH 1 BODY or FETCH 1 BODYSTRUCTURE command (!without brackets '[]'!). Because the hierarchy in this structure pretty much determines which number corresponds to which part. 

    The command you are using just fetches all of the text part ( not the BODY[HEADER] part ) and sends that. So with attachments its also a bottleneck to your performance to use BODY[text]. 

    Hope i helped you enough with that =) 

    With kind regards,

    Roy 

    Wednesday, October 3, 2012 7:19 AM
  • Hi Vilmos,

     

    Thank you for your kind words :). 

    Ok i get it that Exchange does not support this, but these are mailboxes that are not compatible for IMAP. But still these mailboxes are visible in the Listing. So in my honest opinion i think the exchange server should not list these incompatible mailboxes. Now of course i can check for a exchange server and ignore these mailboxes, but this is also removing certain functionality of the exchange server. This is why:

    I am aware that you can setup the calender / tasks format in the exchange server. Now i think i can assume that the format we are using is Microsoft OWA specialized format. Not the Icalendar or other open standard format. 

    so if i would ignore the listing of the tasks and calendar mailboxes, i could take the opportunity away to switch from the OWA format to the Icalendar format. Or it could just take away the functionality of fetching calendar / tasks ( did i mention contacts? ) form the exchange server. Witch would be pretty awsome to do.

    Now it is not within our scope to include the MAPI protocol  ( i think the only one that is compatible ) in our product ( all time and money related of course ).

    Now my last statement is that the Exchange server should not list the mailboxes that are not compatible with IMAP. Since the items inside these mailboxes are given back as server errors. Could you give me some reaction what kind of 

    Could you confirm this thought of mine: If the Exchange server his calendar/tasks his format are of the Icalender and Itasks format, Would they be compatible with IMAP ? I  cannot test this because i cannot setup a test Exchange server of course.

    Thanks in advance again!

    Kind Regards,

    Roy

    Wednesday, October 3, 2012 10:34 AM
  • Hi Roy,

    In the 2<sup>nd</sup> paragraph of your previous posting you wrote “But still these mailboxes are visible in the Listing.”, please tell which listing you are referring to.

    The iCalendar is supported by various Microsoft products including Exchange. Just a reminder, the purpose of this forum is to support the Open Specification documentation; your question should refer to a document from that library. If you try to implement iCalendar (like you did with IMAP) and you have a specific question, don’t hesitate to ask it (preferably in a new thread).

    Thanks, Vilmos

    Wednesday, October 31, 2012 9:54 PM
  • Hi Vilmos,

    I mean the listing i get from the IMAP command "LIST "" * " . This commands returns all of the mailboxes ( or some with other parameters at the quotes and asterisk ). And in this listing i get those non-IMAP compatible mailboxes in the response. Then again if i select one of the non-IMAP compatible mailboxes ( calendar, agenda, tasks etc.. ) and fetch an item in that mailbox i get the response that i put in the first post.  This IMAP listing does not give a hint of a non-IMAP compatible mailbox.

    I know the iCalendar stuff is available. If i enable that, it will go as a charm (probably). 

    My last point being is again that the server should not return the "mailboxes" tasks, calendar, agenda etc. IF the calendar/tasks format is in the Microsoft OWA format. Just becouse IMAP just can't do anything with them. It brings confusion to the developer, because the name of these mailboxes are different in every languages ( obviously ). So you cant just filter out those mailboxes becouse you CAN then filter out a good mailbox with that name the user created himself.

    From the point of view as IMAP i consider this as a bug. I get a list of all the mailboxes through IMAP, these non-IMAP compatible mailboxes are also in this list, i can select them and try to fetch items in them, but this gives an error INSIDE that message. It would be very dirty to filter them when connected to an exchange server, because these mailboxes are language dependant and you could filter out a user made mailbox. 

    Thanks in advance,

    Roy.

    Thursday, November 1, 2012 8:44 AM
  • Hi Roy,

    You wrote “the listing i get from the IMAP command "LIST "" * " . This commands returns all of the mailboxes … i consider this as a bug. I get a list of all the mailboxes through IMAP, these non-IMAP compatible mailboxes are also in this list”.
    This works as documented in [MS-STANXIMAP] — v20121003
    2.2.19 [RFC3501] Section 6.3.8, LIST Command
    ……….
    Microsoft Exchange does not hide any mailboxes from wildcard characters.

    The Exchange IMAP LIST command works as documented and there is no plan to change its behavior.

    Thanks, Vilmos

    • Marked as answer by Roysten Friday, November 16, 2012 12:34 PM
    Thursday, November 15, 2012 6:12 PM