foens / hpop

OpenPOP.NET code repository
http://hpop.sourceforge.net/
204 stars 114 forks source link

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

Open longinosc opened 8 years ago

longinosc commented 8 years ago

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

longinosc commented 8 years ago

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

jstedfast commented 8 years ago

This is the same as issue #44

Kiuman commented 5 years ago

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?

jstedfast commented 5 years ago

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

Kiuman commented 5 years ago

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 :)

jstedfast commented 5 years ago

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

Kiuman commented 5 years ago

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 :(

jstedfast commented 5 years ago

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 :(