{"id":142,"date":"2014-09-08T10:14:39","date_gmt":"2014-09-08T10:14:39","guid":{"rendered":"http:\/\/www.danieledavi.com\/blog\/?p=142"},"modified":"2014-09-05T16:30:55","modified_gmt":"2014-09-05T16:30:55","slug":"how-to-read-a-pop3-server-mail-folder-with-c","status":"publish","type":"post","link":"https:\/\/www.danieledavi.com\/blog\/2014\/09\/how-to-read-a-pop3-server-mail-folder-with-c\/","title":{"rendered":"How to read a Pop3 server mail folder with C#"},"content":{"rendered":"<p>Let&#8217;s see how to read emails from a pop3 Server.<\/p>\n<p>After setting some variables, we&#8217;ll create a connection to the Pop3 Server and we&#8217;ll try to autenticate with user and password. After we&#8217;ll take a bunch of messages and we&#8217;ll start to iterate some operation per each message.<\/p>\n<p><div id=\"attachment_140\" style=\"width: 310px\" class=\"wp-caption alignleft\"><a href=\"http:\/\/www.danieledavi.com\/blog\/wp-content\/uploads\/2014\/09\/csharp-image.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-140\" src=\"http:\/\/www.danieledavi.com\/blog\/wp-content\/uploads\/2014\/09\/csharp-image.png\" alt=\"C Sharp\" width=\"300\" height=\"300\" class=\"size-full wp-image-140\" srcset=\"https:\/\/www.danieledavi.com\/blog\/wp-content\/uploads\/2014\/09\/csharp-image.png 300w, https:\/\/www.danieledavi.com\/blog\/wp-content\/uploads\/2014\/09\/csharp-image-150x150.png 150w, https:\/\/www.danieledavi.com\/blog\/wp-content\/uploads\/2014\/09\/csharp-image-50x50.png 50w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-140\" class=\"wp-caption-text\">C#<\/p><\/div>The message can be cleaned, processed, saved or used in any way you want.<br \/>\nAfter we&#8217;ll delete the message from the server and we&#8217;ll disconnect the user.<br \/>\nTo do this we&#8217;ll use an external library called IndipendentSoft.Email so at the beginning of the file we&#8217;ll include these 2 lines:<\/p>\n<pre>using Independentsoft.Email.Pop3;\r\nusing Independentsoft.Email.Mime;<\/pre>\n<p>Now we can write code we need.<\/p>\n<pre>public int checkPop3()\r\n{\r\n\tWriteLog(\"- checkPop3 START\");\r\n\tPop3Server = rootkey.GetValue(\"POP3Server\").ToString();\r\n\tPop3User = rootkey.GetValue(\"POP3User\").ToString();\r\n\tPop3Pass = \"your-password\"\r\n\r\n\tint myResult = 0;\r\n\tint myStep = 0;\r\n\tint messageIndex = 0;\r\n\tint mymaxdelfor = 20; \/\/how many messages to read per each connection\r\n\tPop3Client client = null;\r\n\r\n\tIndependentsoft.Email.Mime.Message myMessage = null;\r\n\tString myCode = \"\";\r\n\tmyStep = 1;\r\n\tclient = new Pop3Client(Pop3Server);\r\n\ttry\r\n\t{\r\n\t\tclient.Connect();\r\n\t\tWriteLog(\"Conn POP3: OK\");\r\n\t}\r\n\tcatch (Exception myEx)\r\n\t{\r\n\t\tWriteLog(\"Conn POP3: KO\" + myEx.ToString());\r\n\t\treturn 0;\r\n\t}\r\n\ttry\r\n\t{\r\n\t\tclient.Login(Pop3User, Pop3Pass);\r\n\t\tWriteLog(\"Login POP3: OK\");\r\n\t}\r\n\tcatch (Exception myEx2)\r\n\t{\r\n\t\tWriteLog(\"Login POP3: KO\" + myEx2.ToString());\r\n\t\treturn 0;\r\n\t}\r\n\tMessageInfo[] messageInfo;\r\n\ttry\r\n\t{\r\n\t\tmessageInfo = client.List();\r\n\t\tWriteLog(\"List POP3: OK\");\r\n\t}\r\n\tcatch (Exception myEx3)\r\n\t{\r\n\t\tWriteLog(\"List POP3: KO\" + myEx3.ToString());\r\n\t\tthrow;\r\n\t}\r\n\t\r\n\tmyStep = 2;\r\n\tif (messageInfo.Length > 0)\r\n\t{\r\n\t\tWriteLog(\"MSG to read: \" + messageInfo.Length);\r\n\t\tmyStep = 3;\r\n\t\tif (messageInfo.Length < mymaxdelfor)\r\n\t\t{\r\n\t\t\tmymaxdelfor = messageInfo.Length;\r\n\t\t}\r\n\r\n\t\tfor (int i = 0; i < mymaxdelfor; i++)\r\n\t\t{\r\n\t\t\tWriteLog(\"MSG n.\" + messageIndex.ToString());\r\n\t\t\tmessageIndex = messageInfo[i].Index;\r\n\t\t\tmyMessage = client.GetMessage(messageIndex);\r\n\t\t\tmyStep = 4;\r\n\t\t\t\r\n\t\t\tDoYourThings();\r\n\t\t\t...\r\n\t\t\tmyResult = \"dependsOnYourThings\";\r\n\t\t\t...\r\n\t\t\t\r\n\t\t}\r\n\t\t\tclient.Delete(messageIndex);\r\n\t}\r\n\t\tclient.Disconnect();\r\n\t\tWriteLog(\"DISCONNECT POP3 OK\");\r\n\t\r\n\tWriteLog(\"- checkPop3 END\");\r\n\treturn myResult;\r\n}\r\n<\/pre>\n<p>The number of messages to read in a box, can be very high, even hundreds of thousands and not just because of spam but according to the application and email purpose.<br \/>\nSo in time I experienced that for high volumes and big size emails it is better not to read all the messages. So I choose a maximum (20) per each connection.<\/p>\n<p>Of course you can read the pop3 according to some events or call your function every some minutes according to a timer.<\/p>\n<p>Enjoy.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Let&#8217;s see how to read emails from a pop3 Server. After setting some variables, we&#8217;ll create a connection to the Pop3 Server and we&#8217;ll try to autenticate with user and password. After we&#8217;ll take a bunch of messages and we&#8217;ll start to iterate some operation per each message. The message can be cleaned, processed, saved [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[12],"tags":[50,49,53,51,52,48,44],"class_list":["post-142","post","type-post","status-publish","format-standard","hentry","category-dot-net-c-sharp","tag-connect","tag-email","tag-eml","tag-indipendentsoft","tag-mime","tag-pop3","tag-read"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"Let&#039;s see how to read emails from a pop3 Server. After setting some variables, we&#039;ll create a connection to the Pop3 Server and we&#039;ll try to autenticate with user and password. After we&#039;ll take a bunch of messages and we&#039;ll start to iterate some operation per each message. The message can be cleaned, processed, saved\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Daniele Dav\u00ec\"\/>\n\t<meta name=\"keywords\" content=\"connect,email,eml,indipendentsoft,mime,pop3,read\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.danieledavi.com\/blog\/2014\/09\/how-to-read-a-pop3-server-mail-folder-with-c\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Daniele Davi&#039; | Author, Coach, Executive\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"How to read a Pop3 server mail folder with C# | Daniele Davi&#039;\" \/>\n\t\t<meta property=\"og:description\" content=\"Let&#039;s see how to read emails from a pop3 Server. After setting some variables, we&#039;ll create a connection to the Pop3 Server and we&#039;ll try to autenticate with user and password. After we&#039;ll take a bunch of messages and we&#039;ll start to iterate some operation per each message. The message can be cleaned, processed, saved\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.danieledavi.com\/blog\/2014\/09\/how-to-read-a-pop3-server-mail-folder-with-c\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2014-09-08T10:14:39+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2014-09-05T16:30:55+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@_danieledavi\" \/>\n\t\t<meta name=\"twitter:title\" content=\"How to read a Pop3 server mail folder with C# | Daniele Davi&#039;\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Let&#039;s see how to read emails from a pop3 Server. After setting some variables, we&#039;ll create a connection to the Pop3 Server and we&#039;ll try to autenticate with user and password. After we&#039;ll take a bunch of messages and we&#039;ll start to iterate some operation per each message. The message can be cleaned, processed, saved\" \/>\n\t\t<meta name=\"twitter:creator\" content=\"@_danieledavi\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/2014\\\/09\\\/how-to-read-a-pop3-server-mail-folder-with-c\\\/#article\",\"name\":\"How to read a Pop3 server mail folder with C# | Daniele Davi'\",\"headline\":\"How to read a Pop3 server mail folder with C#\",\"author\":{\"@id\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/author\\\/admin\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/#person\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/09\\\/csharp-image.png\",\"@id\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/2014\\\/09\\\/how-to-read-a-pop3-server-mail-folder-with-c\\\/#articleImage\",\"width\":300,\"height\":300,\"caption\":\"C#\"},\"datePublished\":\"2014-09-08T10:14:39+01:00\",\"dateModified\":\"2014-09-05T16:30:55+01:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/2014\\\/09\\\/how-to-read-a-pop3-server-mail-folder-with-c\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/2014\\\/09\\\/how-to-read-a-pop3-server-mail-folder-with-c\\\/#webpage\"},\"articleSection\":\".Net C#, connect, email, eml, IndipendentSoft, mime, Pop3, read\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/2014\\\/09\\\/how-to-read-a-pop3-server-mail-folder-with-c\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.danieledavi.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/category\\\/programming\\\/#listItem\",\"name\":\"Programming\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/category\\\/programming\\\/#listItem\",\"position\":2,\"name\":\"Programming\",\"item\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/category\\\/programming\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/category\\\/programming\\\/dot-net-c-sharp\\\/#listItem\",\"name\":\".Net C#\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.danieledavi.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/category\\\/programming\\\/dot-net-c-sharp\\\/#listItem\",\"position\":3,\"name\":\".Net C#\",\"item\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/category\\\/programming\\\/dot-net-c-sharp\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/2014\\\/09\\\/how-to-read-a-pop3-server-mail-folder-with-c\\\/#listItem\",\"name\":\"How to read a Pop3 server mail folder with C#\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/category\\\/programming\\\/#listItem\",\"name\":\"Programming\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/2014\\\/09\\\/how-to-read-a-pop3-server-mail-folder-with-c\\\/#listItem\",\"position\":4,\"name\":\"How to read a Pop3 server mail folder with C#\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/category\\\/programming\\\/dot-net-c-sharp\\\/#listItem\",\"name\":\".Net C#\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/#person\",\"name\":\"Daniele Davi'\",\"sameAs\":[\"https:\\\/\\\/twitter.com\\\/_danieledavi\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/daniele-d-93168411\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/author\\\/admin\\\/#author\",\"url\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/author\\\/admin\\\/\",\"name\":\"Daniele Dav\\u00ec\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/2014\\\/09\\\/how-to-read-a-pop3-server-mail-folder-with-c\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a724123f14df7848229a1ebf22e4cafabdb50b8aa9fd5540d96f3bb1d7f3f435?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Daniele Dav\\u00ec\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/2014\\\/09\\\/how-to-read-a-pop3-server-mail-folder-with-c\\\/#webpage\",\"url\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/2014\\\/09\\\/how-to-read-a-pop3-server-mail-folder-with-c\\\/\",\"name\":\"How to read a Pop3 server mail folder with C# | Daniele Davi'\",\"description\":\"Let's see how to read emails from a pop3 Server. After setting some variables, we'll create a connection to the Pop3 Server and we'll try to autenticate with user and password. After we'll take a bunch of messages and we'll start to iterate some operation per each message. The message can be cleaned, processed, saved\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/2014\\\/09\\\/how-to-read-a-pop3-server-mail-folder-with-c\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/author\\\/admin\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/author\\\/admin\\\/#author\"},\"datePublished\":\"2014-09-08T10:14:39+01:00\",\"dateModified\":\"2014-09-05T16:30:55+01:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/\",\"name\":\"Daniele Davi'\",\"description\":\"Author, Coach, Executive\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.danieledavi.com\\\/blog\\\/#person\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"How to read a Pop3 server mail folder with C# | Daniele Davi'","description":"Let's see how to read emails from a pop3 Server. After setting some variables, we'll create a connection to the Pop3 Server and we'll try to autenticate with user and password. After we'll take a bunch of messages and we'll start to iterate some operation per each message. The message can be cleaned, processed, saved","canonical_url":"https:\/\/www.danieledavi.com\/blog\/2014\/09\/how-to-read-a-pop3-server-mail-folder-with-c\/","robots":"max-image-preview:large","keywords":"connect,email,eml,indipendentsoft,mime,pop3,read","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.danieledavi.com\/blog\/2014\/09\/how-to-read-a-pop3-server-mail-folder-with-c\/#article","name":"How to read a Pop3 server mail folder with C# | Daniele Davi'","headline":"How to read a Pop3 server mail folder with C#","author":{"@id":"https:\/\/www.danieledavi.com\/blog\/author\/admin\/#author"},"publisher":{"@id":"https:\/\/www.danieledavi.com\/blog\/#person"},"image":{"@type":"ImageObject","url":"https:\/\/www.danieledavi.com\/blog\/wp-content\/uploads\/2014\/09\/csharp-image.png","@id":"https:\/\/www.danieledavi.com\/blog\/2014\/09\/how-to-read-a-pop3-server-mail-folder-with-c\/#articleImage","width":300,"height":300,"caption":"C#"},"datePublished":"2014-09-08T10:14:39+01:00","dateModified":"2014-09-05T16:30:55+01:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/www.danieledavi.com\/blog\/2014\/09\/how-to-read-a-pop3-server-mail-folder-with-c\/#webpage"},"isPartOf":{"@id":"https:\/\/www.danieledavi.com\/blog\/2014\/09\/how-to-read-a-pop3-server-mail-folder-with-c\/#webpage"},"articleSection":".Net C#, connect, email, eml, IndipendentSoft, mime, Pop3, read"},{"@type":"BreadcrumbList","@id":"https:\/\/www.danieledavi.com\/blog\/2014\/09\/how-to-read-a-pop3-server-mail-folder-with-c\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.danieledavi.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/www.danieledavi.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/www.danieledavi.com\/blog\/category\/programming\/#listItem","name":"Programming"}},{"@type":"ListItem","@id":"https:\/\/www.danieledavi.com\/blog\/category\/programming\/#listItem","position":2,"name":"Programming","item":"https:\/\/www.danieledavi.com\/blog\/category\/programming\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.danieledavi.com\/blog\/category\/programming\/dot-net-c-sharp\/#listItem","name":".Net C#"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.danieledavi.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.danieledavi.com\/blog\/category\/programming\/dot-net-c-sharp\/#listItem","position":3,"name":".Net C#","item":"https:\/\/www.danieledavi.com\/blog\/category\/programming\/dot-net-c-sharp\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.danieledavi.com\/blog\/2014\/09\/how-to-read-a-pop3-server-mail-folder-with-c\/#listItem","name":"How to read a Pop3 server mail folder with C#"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.danieledavi.com\/blog\/category\/programming\/#listItem","name":"Programming"}},{"@type":"ListItem","@id":"https:\/\/www.danieledavi.com\/blog\/2014\/09\/how-to-read-a-pop3-server-mail-folder-with-c\/#listItem","position":4,"name":"How to read a Pop3 server mail folder with C#","previousItem":{"@type":"ListItem","@id":"https:\/\/www.danieledavi.com\/blog\/category\/programming\/dot-net-c-sharp\/#listItem","name":".Net C#"}}]},{"@type":"Person","@id":"https:\/\/www.danieledavi.com\/blog\/#person","name":"Daniele Davi'","sameAs":["https:\/\/twitter.com\/_danieledavi","https:\/\/www.linkedin.com\/in\/daniele-d-93168411\/"]},{"@type":"Person","@id":"https:\/\/www.danieledavi.com\/blog\/author\/admin\/#author","url":"https:\/\/www.danieledavi.com\/blog\/author\/admin\/","name":"Daniele Dav\u00ec","image":{"@type":"ImageObject","@id":"https:\/\/www.danieledavi.com\/blog\/2014\/09\/how-to-read-a-pop3-server-mail-folder-with-c\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/a724123f14df7848229a1ebf22e4cafabdb50b8aa9fd5540d96f3bb1d7f3f435?s=96&d=mm&r=g","width":96,"height":96,"caption":"Daniele Dav\u00ec"}},{"@type":"WebPage","@id":"https:\/\/www.danieledavi.com\/blog\/2014\/09\/how-to-read-a-pop3-server-mail-folder-with-c\/#webpage","url":"https:\/\/www.danieledavi.com\/blog\/2014\/09\/how-to-read-a-pop3-server-mail-folder-with-c\/","name":"How to read a Pop3 server mail folder with C# | Daniele Davi'","description":"Let's see how to read emails from a pop3 Server. After setting some variables, we'll create a connection to the Pop3 Server and we'll try to autenticate with user and password. After we'll take a bunch of messages and we'll start to iterate some operation per each message. The message can be cleaned, processed, saved","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.danieledavi.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/www.danieledavi.com\/blog\/2014\/09\/how-to-read-a-pop3-server-mail-folder-with-c\/#breadcrumblist"},"author":{"@id":"https:\/\/www.danieledavi.com\/blog\/author\/admin\/#author"},"creator":{"@id":"https:\/\/www.danieledavi.com\/blog\/author\/admin\/#author"},"datePublished":"2014-09-08T10:14:39+01:00","dateModified":"2014-09-05T16:30:55+01:00"},{"@type":"WebSite","@id":"https:\/\/www.danieledavi.com\/blog\/#website","url":"https:\/\/www.danieledavi.com\/blog\/","name":"Daniele Davi'","description":"Author, Coach, Executive","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.danieledavi.com\/blog\/#person"}}]},"og:locale":"en_US","og:site_name":"Daniele Davi' | Author, Coach, Executive","og:type":"article","og:title":"How to read a Pop3 server mail folder with C# | Daniele Davi'","og:description":"Let's see how to read emails from a pop3 Server. After setting some variables, we'll create a connection to the Pop3 Server and we'll try to autenticate with user and password. After we'll take a bunch of messages and we'll start to iterate some operation per each message. The message can be cleaned, processed, saved","og:url":"https:\/\/www.danieledavi.com\/blog\/2014\/09\/how-to-read-a-pop3-server-mail-folder-with-c\/","article:published_time":"2014-09-08T10:14:39+00:00","article:modified_time":"2014-09-05T16:30:55+00:00","twitter:card":"summary_large_image","twitter:site":"@_danieledavi","twitter:title":"How to read a Pop3 server mail folder with C# | Daniele Davi'","twitter:description":"Let's see how to read emails from a pop3 Server. After setting some variables, we'll create a connection to the Pop3 Server and we'll try to autenticate with user and password. After we'll take a bunch of messages and we'll start to iterate some operation per each message. The message can be cleaned, processed, saved","twitter:creator":"@_danieledavi"},"aioseo_meta_data":{"post_id":"142","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2023-12-01 12:21:06","updated":"2026-08-10 00:21:17","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.danieledavi.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.danieledavi.com\/blog\/category\/programming\/\" title=\"Programming\">Programming<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.danieledavi.com\/blog\/category\/programming\/dot-net-c-sharp\/\" title=\".Net C#\">.Net C#<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tHow to read a Pop3 server mail folder with C#\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.danieledavi.com\/blog"},{"label":"Programming","link":"https:\/\/www.danieledavi.com\/blog\/category\/programming\/"},{"label":".Net C#","link":"https:\/\/www.danieledavi.com\/blog\/category\/programming\/dot-net-c-sharp\/"},{"label":"How to read a Pop3 server mail folder with C#","link":"https:\/\/www.danieledavi.com\/blog\/2014\/09\/how-to-read-a-pop3-server-mail-folder-with-c\/"}],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p90hsv-2i","jetpack-related-posts":[],"amp_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.danieledavi.com\/blog\/wp-json\/wp\/v2\/posts\/142","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.danieledavi.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.danieledavi.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.danieledavi.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.danieledavi.com\/blog\/wp-json\/wp\/v2\/comments?post=142"}],"version-history":[{"count":1,"href":"https:\/\/www.danieledavi.com\/blog\/wp-json\/wp\/v2\/posts\/142\/revisions"}],"predecessor-version":[{"id":143,"href":"https:\/\/www.danieledavi.com\/blog\/wp-json\/wp\/v2\/posts\/142\/revisions\/143"}],"wp:attachment":[{"href":"https:\/\/www.danieledavi.com\/blog\/wp-json\/wp\/v2\/media?parent=142"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.danieledavi.com\/blog\/wp-json\/wp\/v2\/categories?post=142"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.danieledavi.com\/blog\/wp-json\/wp\/v2\/tags?post=142"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}