Open greezer opened 12 years ago
I got it working for plain text, but I can not be guarantee that it will be sent in plan text. How can I read this message using other tags beside plain text?
The same for me. Email body contains
<p>...</p>
<p>...<p>
and only first p content is returned.
Content-Type of the message: multipart/mixed; 1st part Content-Type: text/plain; charset="UTF-8" 2nd part Content-Type: text/plain; charset="UTF-8"; name="file.txt"
Update: I've found that Load method in MailMessage doesn't add Attachments to the whole message body, only AlternateViews. And there is no possibility to store body parts as Collection to process multipart messages, as I see.
The code that I use to get the body from the message:
var body = msg.Body; if (parser.ParseMail(msg.Body.ToString())){}
Both methodes return only the first line from the email body. (output: "# DO NOT EDIT THIS MAIL BY HAND #\r\n")
below is the body of the message shown:
"# DO NOT EDIT THIS MAIL BY HAND #
"[Platform]:(2)
"[AppType]:(1)
"[AppVersion]:"1.57 build 000"
"[AppDesciption]:"AppName"
"# DO NOT EDIT THIS MAIL BY HAND #"
My question is how can I read the whole body message of the email?
Thanks in advance
Greezer