From 4645a21b99fe675927b91e2c8c6af99c0a350954 Mon Sep 17 00:00:00 2001 From: Melvin L Date: Mon, 14 Sep 2020 12:31:30 +0200 Subject: [PATCH 1/2] Early Know it's still in the early stages, but looks great! --- README.md | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0a4c235..ab2ff0d 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ The EWS Toolkit is a .NET Framework Library that wraps around the EWS Managed AP ## Example +Auth and send email ``` using Toolkit; @@ -13,6 +14,8 @@ namespace DemoApp { static void Main(string[] args) { + //Program.exe random@example.org Passw0rd123 + var connection = new ExchangeConnection(ExchangeVersion.Exchange2013_SP1); connection.SetConnectionCredentials(args[0], args[1].ToSecureString()); connection.SetAutodiscoverUrl(args[0]); @@ -25,4 +28,37 @@ namespace DemoApp } } } -``` \ No newline at end of file +``` + +Auth and search for keywords in the inbox and sent folders +``` +using Toolkit; + +namespace DemoApp +{ + class Program + { + static void Main(string[] args) + { + + //Program.exe random@example.org Passw0rd123 + + ExchangeConnection connection = new ExchangeConnection(ExchangeVersion.Exchange2013_SP1); + connection.SetConnectionCredentials(args[0], args[1].ToSecureString()); + connection.SetAutodiscoverUrl(args[0]); + + Search searchData = new Search(connection); + + //Add single search terms + searchData.AddBodySearchTerm("Password"); + searchData.AddSubjectSearchTerm("Onoarding"); + + //Add multi search terms + searchData.AddBodySearchTerms(new string[] { "Password", "Login" }); + searchData.AddSubjectSearchTerms(new string[] { "Onboarding", "Welcome" }); + + List searchResult = searchData.SearchFolder(FolderName.Inbox | FolderName.SentItems); + } + } +} +``` From c8a12d1d77c6aa46a1f51976a7802614595289df Mon Sep 17 00:00:00 2001 From: Melvin L Date: Mon, 14 Sep 2020 12:32:15 +0200 Subject: [PATCH 2/2] I still can't write --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ab2ff0d..dc8d567 100644 --- a/README.md +++ b/README.md @@ -50,8 +50,8 @@ namespace DemoApp Search searchData = new Search(connection); //Add single search terms - searchData.AddBodySearchTerm("Password"); - searchData.AddSubjectSearchTerm("Onoarding"); + searchData.AddBodySearchTerm("Administrator"); + searchData.AddSubjectSearchTerm("Support"); //Add multi search terms searchData.AddBodySearchTerms(new string[] { "Password", "Login" });