Exemple #1
0
        public static async Task <bool> TryDeleteMailFolderAsync()
        {
            var folderId = await EmailSnippets.CreateMailFolderAsync("Inbox", "FolderToDelete");

            var isFolderDeleted = await EmailSnippets.DeleteMailFolderAsync(folderId);

            return(isFolderDeleted);
        }
Exemple #2
0
        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);
        }
Exemple #3
0
        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);
        }
Exemple #4
0
        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);
        }