Download Message Body

Topics: Help requests
Sep 21, 2015 at 5:13 AM
Edited Sep 24, 2015 at 3:11 PM
Hey!
How to download the Body of a Message and save it to a MySQL DB.
I can't download the Body Message correctly... any start point?
Sep 22, 2015 at 2:28 AM
Edited Sep 22, 2015 at 2:29 AM
VB CODE:

Dim aMessage As ImapX.Message
Dim exampleString as String

aMessage = Client.Folders.Item(i)
exampleString = If(aMessage.Body.HasHtml, aMessage.Body.Html, aMessage.Body.Text)
Sep 24, 2015 at 3:12 PM
Thanks for the answer @RGEN now all is Working fine, but I got an Exception here:
string body = aMessage.Body.HasHtml ? aMessage.Body.Html : aMessage.Body.Text;
This Only happens with the Password Recovery Email that is sent by StackOverflow (The Q&A website)
The Exception says:
System.FormatException: The input is not a valid Base64 string that contains a character that is not Base 64, more than two padding characters, or an invalid character among the padding characters.
Maybe a library bug?