0 votes

Hi,
I have an issue retrieving the plain text body from the email.

I am using the following code:

IMail email = new MailBuilder().CreateFromEmlFile(args[0]);
string body=email.GetTextFromHtml();

The body of the email contains a line with a ‘<’ character in it and this seems to be truncating the text retrieved.

I have just updated to the latest version of Mail.dll to see if it fixes the problem – but it doesn’t.

by

1 Answer

0 votes
 
Best answer

'<' is not allowed character in HTML. It is used to represent a tag start (such as img, a, body)

You must use < escaping sequence instead.

Mail.dll behaves correctly here, I'm sure that all browsers (ie, chrome, ff) also truncate the text after this start tag character.

by (301k points)
...