public static bool MarkAsRead(string graph_api_endpoint, string username, string emailID, string token) { var markAsReadBody = new JsonBody { IsRead = true }; try { ApiCallers.API_Action_Caller( graph_api_endpoint, string.Format("/users/{0}/messages/{1}", username, emailID), token, "patch", markAsReadBody ); return(true); } catch (System.Exception) { return(false); } }
public static bool MoveEmail(string archiveMailFolderID, string graph_api_endpoint, string username, string emailID, string token) { var moveEmailBody = new MoveEmailBody { DestinationId = archiveMailFolderID }; try { ApiCallers.API_Action_Caller( graph_api_endpoint, string.Format("/users/{0}/messages/{1}/move", username, emailID), token, "post", moveEmailBody ); return(true); } catch (System.Exception) { return(false); } }