Archives

Archives / 2005 / October
  • Using the Messenger API in HTML

    Here is an example showing how to show a count of unread email in your inbox:

    <object id="objMessenger" classid="clsid:B69003B3-C55E-4B48-836C-BC5946FC3B28" VIEWASTEXT></object>
    <script language="jscript">
    function updateUnreadEmail()
    {
     spanUnreadEmail.innerHTML=objMessenger.UnreadEmailCount(0);
    }
    </script>
    <span id="spanUnreadEmail"></span>
    You'll then need to invoke the updateUnreadEmail() function which you could do in the body's onload event.  This is all client side and can be in any web page.  There is no error handling so it only works if you have Messenger running and signed in, but what this shows is what I wanted to find out which is that it is possible.