public Mail getemail(string id, string email) { Mail m = new Mail(); try { string Result = PHPRequests.HttpRequest(Appcontext.resource + "/v1.0/users/" + email + "/messages/" + id, string.Empty, this.Authetication, Constants.Get, string.Empty); JavaScriptSerializer js = new JavaScriptSerializer(); m = js.Deserialize <Mail>(Result); } catch (Exception e) { } return(m); }
public Mail moveEmail(string id, string folder, string email) { Mail m = new Mail(); try { Move move = new Move() { destinationId = folder }; string json = new JavaScriptSerializer().Serialize(move); string Result = PHPRequests.HttpRequest(Appcontext.resource + "/v1.0/users/" + email + "/messages/" + id + "/move", json, this.Authetication, Constants.Get, string.Empty); JavaScriptSerializer js = new JavaScriptSerializer(); m = js.Deserialize <Mail>(Result); } catch (Exception e) { } return(m); }