private static string createOwaIdForExch2007(ItemType exchMail)
{
string owaUri;
byte[] itemBinId = System.Convert.FromBase64String(exchMail.ItemId.Id);
byte[] owaBinUri = new byte[72];
owaBinUri[0] = 70;
Array.Copy(itemBinId, 27, owaBinUri, 1, 70);
owaBinUri[owaBinUri.Length - 1] = 9 //(means message type);
owaUri = Convert.ToBase64String(owaBinUri);
owaUri = System.Web.HttpUtility.UrlEncode(owaUri);
return owaUri;
}
private static string createOwaIdForExch2010(ItemType exchMail)
{
string owaUri;
byte[] itemBinId = System.Convert.FromBase64String(exchMail.ItemId.Id);
byte[] owaBinUri = new byte[72];
owaBinUri[0] = 70;
Array.Copy(itemBinId, 23, owaBinUri, 1, 70);
owaBinUri[owaBinUri.Length - 1] = 9 //(means message type);
owaUri = Convert.ToBase64String(owaBinUri);
owaUri = System.Web.HttpUtility.UrlEncode(owaUri);
return owaUri;
}