Reading EML files from the Windows SMTP service. Any reason not to use StreamReader?

I am going to read and parse EML files dropped by Microsoft SMTP. I am new to using various thread classes. The implementation I saw that parses these files uses a variable in System.IO.Stream to read byte by byte. However, it seems these files should never be something like text. Isn't it better to use StreamReader? And if so, is there any reason to use something other than the default encoding (UTF-8)?

+3
source share
1 answer

They must be text, but they are not always.

8- .

StreamReader 99% , .

, , .

Mime Mime, .

UTF-8 - , , , .

- , , , , .

+1

Source: https://habr.com/ru/post/1734625/


All Articles