Horizontal tabs in header bodies
Hi! First of all, thanks for this great library.
Working with it, I've noticed that while the code works fine for most emails, trying to receive some messages will always cause the following exception while the library is processing the message's headers:
Format failure of the header value '<value>'.
Looking into this issue, I found out that the root cause for this is horizontal tab characters \t which are part of the header value. Simply adding horizontal tabs to the regex HEADER_VALUE_REGEX in mime.cpp did indeed solve the issue for me.
So I wondered if the problematic emails might be incorrectly formatted, but according to RFC 5322 horizontal tabs are explicitly allowed in header values:
A field body may be composed of printable US-ASCII characters as well as the space (SP, ASCII value 32) and horizontal tab (HTAB, ASCII value 9) characters (together known as the white space characters, WSP).
Am I mistaken or should tabs then be added to the allowed characters, at least in the value part of headers?