foens/hpop

Media Type must be in the format type "/" subtype Parameter name: mediaType

Opened this issue · 8 comments

Hi.

Your component is great.

I am testing it and I have an Issue I want to share with you.

I am getting the following message with an specific message.

Media Type must be in the format type "/" subtype Parameter name: mediaType at OpenPop.Mime.Header.HeaderFieldParser.cleanMediaType(String mediaType) at OpenPop.Mime.Header.HeaderFieldParser.ParseContentType(String headerValue) at OpenPop.Mime.Header.MessageHeader.ParseHeader(String headerName, String headerValue)
I've got the raw message using GetMessageAsBytes and I saw something could be the cause of the trouble.

Content-Type: pdf;

As I know it should be Content-Type: application/pdf;

If you have any suggestion or fix about it, it would be great.

Thanks.

Longinos Castillo Mexico

Error.txt
This is the raw corresponding to the email generating this exception

This is the same as issue #44

Experiencing similar problem from a system sending Content-Type: unknown; name="807900_1.pdf" instead of Content-Type: application/pdf; name="807900_1.pdf"
How can this be solved?

@Kiuman hopefully the OpenPOP developers can help you, but if not, I have my own library called MailKit that should work fine for you.

Hi @jstedfast
Yes, I have seen you library and seems cool.
If I can't solve my problem with openPOP then I'll have to change my code and migrate to your library.
Just for the sake of my laziness I hope this will have an easy solution :)

I hope so, too. Good luck either way :)

Well, as I need a relatively fast solution then I decided to move to MailKit, but unfortunately it requires .NET 4.5 and my project needs to be run on XP (that means .NET 4.0 max - and no, replacing that XP is not an option in any way, there are too many critical and old services running there).
So i guess that I'm stuck :(

MailKit 1.2.x supported .NET 4.0 but I dropped it when I revamped it to be completely async :(

MailKit 1.2.x is still pretty good as an option, but yea, the latest 2.x versions are significantly better :(