how to generate an http url to an email in a user's inbox? RRS feed

  • Question

  • Hello all

    I have a requirement to list the user's emails in a web page as clickable links .

    The email subjects are shown in a table as clickable links , and when the user clicks on the subject, it should take the user to his exchange  mail box with the  clicked email opened.  I am able to list the emails in the table, but do not know how to generate  a unique url for each message item.

    For example here is a link  to a message with subject 'Hello' 

    But  there could be situations where there  are many messages with the same subject. 

    Any idea how can I handle this? I am looking for a way to generate a unique url to an item in a user folder

    thanks in advance



    Wednesday, May 25, 2011 12:53 PM

All replies

  • If you are looking for existing messages, then the most reliable way is to do a search for them.  If you just want to try and predict them, then messages with the same subject will have numbers added to the end, like Hello-1.EML, Hello-2.EML .  If there are non-alphanumeric characters, you will need to escape them, for instance the subject Hello There becomes Hello%20There.EML .  If you are talking about generating your own emails with proppatch, then you can use any unique URL you like.  Exchange generates them based on the subject, but you don't have to actually do that for emails you create for yourself in WebDAV.
    Outlook Web Access For PDA , OWA For WAP
    email a@t leederbyshire d.0.t c.0.m
    Wednesday, May 25, 2011 1:02 PM
  • Yes, I am talking about exisitng messages only. I fetch them using IMAP and display the subject in the webpage as clickable links.

    How do I take the user to the exchange webclient with the clicked message opened?

    Unlike WebDAV ,  IMAP does not return the unique url for a message . So I have to  form a url to take the user to exchange and open the particular message.

    I have the message id with me, will that be of any use here?

    (Unfortunately I cannot use webdav here. I have to use IMAP for fetching messages from exchange.)

    Thursday, May 26, 2011 4:01 AM
  • If you are going to be able to click on the URL to the message, then you must have web access to the server.  And if you haev web access, then you should be able to use webdav, since it is available by default on an exchange server (versions 2000, 2003, and 2007), and only requires http or https access to the server, although you will have a huge problem if you have forms-based authentication enabled on your OWA.  See if this works for you:

    Other than that, if you really do only have IMAP access, then you will need to guess the URLs from the subject, like you already suggested.  Or if the emails are generated by an application, rewrite the application to include the messages own correct URL in the subject.

    Outlook Web Access For PDA , OWA For WAP
    email a@t leederbyshire d.0.t c.0.m
    Thursday, May 26, 2011 12:21 PM
  • :(  I cannot use WebDAV here and my email fetching is done using IMAP.

    Does exchange webaccess accept any parameters like message id or something to open/preview a particular message? Any idea

    If so I can create uniq urls something like


    (A wishful thinking..)


    Friday, May 27, 2011 6:02 AM
  • Sadly, I've never heard of such a thing in all the years I've been reading about OWA (and I read about it a lot).  It's a shame you can't use WebDAV - it would have helped.
    Outlook Web Access For PDA , OWA For WAP
    email a@t leederbyshire d.0.t c.0.m
    Friday, May 27, 2011 12:47 PM
  • I found a few helpful links but I could not make them work in my exchange 2003


    Tuesday, May 31, 2011 7:01 AM
  • These are known as 'web parts' (something to do with being able to use them in SharePoint).  The available functions give some useful folder and calendar views, but I have never heard of one that retrieves a message based on its ordinal position.
    Outlook Web Access For PDA , OWA For WAP
    email a@t leederbyshire d.0.t c.0.m
    Tuesday, May 31, 2011 1:26 PM