There are some emails use the equal sign in-appropriately without escape it with =3D. This will make golang library fail to parse this kind of email. But some mail clients such as Thunderbird able can parse these malformed emails.
If this line change to break then more emails can be successfully parsed. Or return certain error which indicate it is safe to bypass it.
The text was updated successfully, but these errors were encountered:
I encountered another bad email which need these lines to be commented out too.
In fact, I noticed many of Golang stdlib (mostly on email parsing as I am using these frequently) return error once they encounter error and do not try whether it can do something else. I reported once which was closed #13448. After that actually I found there are many of them too. Another example will be this, why must return? why not finish all first? and return everything that you find good as well as the error - some special error to indicate there are still some useful data. User of this library can then decide whether to ignore the error or not and take whatever good.
I understand this is not some kind error but the fact is the Golang stdlib returning nil or insufficient data once it encounters error (some avoidable or recoverable errors) forced me to move away from stdlib because the need to create compatible email client as Thunderbird using Golang. Still, I believe Golang can do better.