if (protocol.Equals("file") && uriStr.Find("application/x-message-display") != kNotFound) protocol.Assign("mailbox");
nsresult GetMessageServiceContractIDForURI(const char *uri, nsCString &contractID){  nsresult rv = NS_OK;  //Find protocol  nsCAutoString uriStr(uri);  PRInt32 pos = uriStr.FindChar(':');  if(pos == kNotFound)    return NS_ERROR_FAILURE;  nsCAutoString protocol;  uriStr.Left(protocol, pos);  //Build message service contractid  contractID = "@mozilla.org/messenger/messageservice;1?type=";  contractID += protocol.get();  return rv;}