public static async Task <bool> TryDeleteMailFolderAsync() { var folderId = await EmailSnippets.CreateMailFolderAsync("Inbox", "FolderToDelete"); var isFolderDeleted = await EmailSnippets.DeleteMailFolderAsync(folderId); return(isFolderDeleted); }
public static async Task <bool> TryCreateMailFolderAsync() { var folderId = await EmailSnippets.CreateMailFolderAsync("Inbox", "FolderToDelete"); if (!string.IsNullOrEmpty(folderId)) { //Cleanup await EmailSnippets.DeleteMailFolderAsync(folderId); return(true); } return(false); }
public static async Task <bool> TryMoveMailFolderAsync() { var folderId = await EmailSnippets.CreateMailFolderAsync("Inbox", "FolderToDelete"); if (!string.IsNullOrEmpty(folderId)) { bool isFolderMoved = await EmailSnippets.MoveMailFolderAsync(folderId, "Drafts"); //Cleanup await EmailSnippets.DeleteMailFolderAsync(folderId); return(isFolderMoved); } return(false); }
public static async Task <bool> TryCopyMailFolderAsync() { var folderId = await EmailSnippets.CreateMailFolderAsync("Inbox", "FolderToCopyAndDelete"); if (!string.IsNullOrEmpty(folderId)) { string copiedFolderId = await EmailSnippets.CopyMailFolderAsync(folderId, "Drafts"); if (!string.IsNullOrEmpty(copiedFolderId)) { //Cleanup await EmailSnippets.DeleteMailFolderAsync(folderId); await EmailSnippets.DeleteMailFolderAsync(copiedFolderId); return(true); } } return(false); }