{"id":1728,"date":"2011-01-04T16:11:16","date_gmt":"2011-01-04T14:11:16","guid":{"rendered":"http:\/\/www.limilabs.com\/blog\/?p=1728"},"modified":"2024-11-19T10:55:46","modified_gmt":"2024-11-19T08:55:46","slug":"i-have-problems-parsing-the-message","status":"publish","type":"post","link":"https:\/\/www.limilabs.com\/blog\/i-have-problems-parsing-the-message","title":{"rendered":"I have problems parsing the message"},"content":{"rendered":"\n<p><a href=\"\/mail\" title=\"\">Mail.dll is a rock solid product<\/a>, however most emails don&#8217;t follow RFC specifications rigorously. In the following few steps we&#8217;ll help you gather the information we need to make Mail.dll parser better.<\/p>\n\n\n\n<p>If you <a href=\"\/blog\/i-have-problems-issuing-imap-pop3-smtp-command\">have problems issuing IMAP, POP3, or SMTP command please go here<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<p>First please check if you have the <strong>latest version<\/strong> of Mail.dll installed. You can always download the latest version of <a href=\"\/mail\/download\">Mail.dll email component and check release notes<\/a> here.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Identify UID<\/h2>\n\n\n\n<p>Please <strong>identify unique id (UID)<\/strong> of the message you are having problems with.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Download email<\/h2>\n\n\n\n<p>Next step is to <strong>download entire email message and save it as a raw eml<\/strong> file.<br>Note that you should not parse the email, so there is no need to use <em>MailBuilder<\/em> and <em>IMail<\/em> classes.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Download using IMAP protocol<\/h3>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\n\/\/ C# code\n\nlong uid = 12345;\n\nusing (Imap imap = new Imap())\n{\n    imap.ConnectSSL(\"imap.example.com\"); \n    imap.UseBestLogin(\"user\";, \"password\");\n    imap.SelectInbox();\n\n    byte&#x5B;] eml = imap.GetMessageByUID(uid);\n    string fileName = string.Format(@\"c:\\email_{0}.eml\", uid);\n    File.WriteAllBytes(fileName, eml);\n\n    imap.Close();\n}\n<\/pre><\/div>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: vb; title: ; notranslate\" title=\"\">\n' VB.NET code\n\nDim uid As Long = 12345\n\nUsing imap As New Imap()\n\timap.ConnectSSL(\"imap.example.com\") \n\timap.UseBestLogin(\"user\", \"password\")\n\timap.SelectInbox()\n\n\tDim eml As Byte() = imap.GetMessageByUID(uid)\n\tDim fileName As String = String.Format(\"c:\\email_{0}.eml\", uid)\n\tFile.WriteAllBytes(fileName, eml))\n\n\timap.Close()\nEnd Using\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\">Download using POP3 protocol<\/h3>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\n\/\/ C# code\n\nstring uid = \"12345\";\n\nusing (Pop3 pop3 = new Pop3())\n{\n    pop3.ConnectSSL(\"pop3.example.com\");\n    pop3.UseBestLogin(\"user\", \"password\");\n\n    byte&#x5B;] eml = pop3.GetMessageByUID(uid));\n    string fileName = string.Format(@\"c:\\email_{0}.eml\", uid);\n    File.WriteAllBytes(fileName, eml);\n\n    pop3.Close();\n}\n<\/pre><\/div>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: vb; title: ; notranslate\" title=\"\">\n' VB.NET code\n\nDim uid As String = \"12345\";\n\nUsing pop3 As New Pop3()\n\tpop3.ConnectSSL(\"pop3.example.com\")\n\tpop3.UseBestLogin(\"user\", \"password\")\n\n\tDim eml As Byte() = pop3.GetMessageByUID(uid)\n\tDim fileName As String = String.Format(\"c:\\email_{0}.eml\", uid)\n\tFile.WriteAllBytes(fileName, eml)\n\n\tpop3.Close()\nEnd Using\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">Additional information<\/h2>\n\n\n\n<p>Please answer following questions:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>What <strong>exception <\/strong>are you getting?<\/li>\n\n\n\n<li>What is the exception<strong> stack trace<\/strong>?<\/li>\n\n\n\n<li>What is the exception <strong>message<\/strong>?<\/li>\n\n\n\n<li>What result do you expect?<\/li>\n\n\n\n<li>What result are you getting?<\/li>\n\n\n\n<li>Which .NET Framework version are you using?<\/li>\n\n\n\n<li>Is it console, windows forms, windows service or web application?<\/li>\n\n\n\n<li>If it is possible please attach the source code you are using<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Contact Limilabs support&nbsp;<\/h2>\n\n\n\n<p>Finally please <strong>zip the eml file and send it as an attachment<\/strong> along with all answers to: <a class=\"email\" title=\"Write to us - we're enthusiastic about support\"><\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Thank you!<\/h2>\n","protected":false},"excerpt":{"rendered":"<p>Mail.dll is a rock solid product, however most emails don&#8217;t follow RFC specifications rigorously. In the following few steps we&#8217;ll help you gather the information we need to make Mail.dll parser better. If you have problems issuing IMAP, POP3, or SMTP command please go here. Prerequisites First please check if you have the latest version [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[15,33,20,28,42,50,57],"class_list":["post-1728","post","type-post","status-publish","format-standard","hentry","category-mail-dll","tag-c","tag-email-component","tag-eml","tag-imap","tag-pop3","tag-smtp","tag-vb-net"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/posts\/1728"}],"collection":[{"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/comments?post=1728"}],"version-history":[{"count":18,"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/posts\/1728\/revisions"}],"predecessor-version":[{"id":6666,"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/posts\/1728\/revisions\/6666"}],"wp:attachment":[{"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/media?parent=1728"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/categories?post=1728"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/tags?post=1728"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}