Hello,
I'm working on a project which allows user to save attachment to user selected location on remote server. For example, a student uses OWA to check his emails at home, he can save attachments in the folders located on the remote server at school.
What I can get on OWA side are:
owaID of the message like:
_sId="RgAAAAB7RLJw1vq4TZJ+Ug2A4QY1BwA+Mfi+BzbkSbxcWw/Wo0gQAAAAAAAUAAA+Mfi+BzbkSbxcWw/Wo0gQAAGCKytpAAAJ"
and owaID of attachment as:
_attid="BAAAAAAA"
I can convert message owaID to ewsID and get the message object. Then, I can loop through the attachments of the message. However, I don't know how to get the ewsId for the selected attachment with _attid="BAAAAAAA". When I try to convert "BAAAAAAA" to ewsId,
it returns "data corrupted" error.
Here is my function to convert owaId to ewsId:
public string ConvertOwaIdtoEWSid(ExchangeService ews, string mailboxSMTP, string idToConvert)
{
string retVal = null;
try
{
AlternateId originalId = new AlternateId(IdFormat.OwaId, idToConvert, mailboxSMTP);
AlternateId newId = ews.ConvertId(originalId, IdFormat.EwsId) as AlternateId;
retVal = newId.UniqueId;
}
catch (Exception ex)
{
retVal = ex.Message;
}
return retVal;
}
Any response would be appreciated. Thanks.