Android Question Something goes wrong parsing an email

MFfromGermany

Member
Licensed User
Hey,

I have a bit of a problem in my project. What I want to do with my app is receiving and showing mails. Receiving works. But there's some problems in showing the body.

Some information on how the mails are sent: I wrote an application for Windows using Visual Basic Studio 2010. In this application the user sends a prepared email via Gmails's SMTP-Server to a given mail address (also Gmail) by clicking a button. (I tried different servers to send mails from, but the problem remains the same..)

Now my app for Android receives these mails, but the message body seems to be decoded in a wrong way. I've been researching and trying everything I could to get this problem solved - but it just didn't work.

It ist strange, because any other mail app for Android can show the body correctly.

Maybe you guys can help me solve this problem.
 

eurojam

Well-Known Member
Licensed User
Longtime User
it is easier to help you, if you provide more information on your problem, like Code example or how the message body looks like. It sounds like an base64 decoding problem....but who knows....;)
 
Upvote 0

MFfromGermany

Member
Licensed User
By converting the string for the mail's body into HTML and showing the mail in my app via WebView it works just fine. But thank you for your support.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
So i guess you´re getting an html mail. Not just plain text... if you read the mail body into a string then you´ll get html code.
 
Upvote 0

MFfromGermany

Member
Licensed User
I get an html mail since I let Visual Basic convert the string to html by calling HttpUtility.HtmlEncode(String) and setting Mail.IsBodyHtml-Boolean to True.
 
Upvote 0
Top