Comments (6)
Ref: https://en.wikipedia.org/wiki/MIME#Encoded-Word
from mailio.
Hello,
Thanks for trying mailio.
The issue is caused by missing space between the displayed name =?windows-1252?Q?Action_fran=E7aise_?=
and the address itself <[email protected]>
. By RFC 5322 section 3.4 the space is required. If you add the missing space character in between, everything works fine.
However, I am aware that RFC requirement sometimes are too hard. There is so called strict mode which (when disabled) allows some of the mandatory requirements to be omitted. Unfortunately, the case with the address is not included. What I can do is take a look into the code and check if the fix can be made easily without breaking the existing functionality.
Also, the MIME formatter/parser recognizes only ASCII and UTF-8 formats of the address (i.e. the displayed name part). Other formats like Windows-1252 are not supported. Doing that would require dealing with various codecs, probably by using an external library.
Regards,
from mailio.
Thanks for looking into this. If I am not mistaken, according to RFC2822 section 3.4 the white space (CFWS
) between the display-name
and the angle-addr
is optional.
What I can do is take a look into the code and check if the fix can be made easily without breaking the existing functionality.
Thanks. Concurrently, I wanted to toy with lemon
and ragel
to see if I can replicate the grammar specified in the RFC faithfully. If I get something usable I'll submit a PR.
from mailio.
Actually, the bug exists only when Q encoding is used for the displayed name. In the case Action francaise<[email protected]>
or "Action francaise"<[email protected]>
(no space between the displayed name and the left bracket) everything works fine. I will investigate this further and let you know.
from mailio.
@xguerin Take a look of the latest commit, tagged with version_0-16-1 on the master branch. It allows parsing of the Q encoded name/address in the case when no space exists between the displayed name and the address. Internal tests (which are far from being perfect) look fine, no existing feature should be broken.
from mailio.
Thanks ! That fixes it for that particular header.
from mailio.
Related Issues (20)
- Problems compiling the example code with CMake HOT 1
- IMAP(Switching to SSL failed.) HOT 2
- IMAP list folder, encoding error ? HOT 12
- Switching to SSL failed HOT 8
- send imap quoted string HOT 9
- imap fetch command response parsing HOT 2
- parsing imap quoted string HOT 2
- segmentation fault in imap fetch function
- parsing imap resp-text
- [Question] Image in the body of the message HOT 10
- Please, could anyone provide me an example of how to get the mail content as a unencoded string? HOT 2
- Linking errors HOT 11
- Is it ok to use `-std=c++17` instead of `-std=gnu++1z` HOT 1
- smtps::connection::submit response HOT 2
- add_bcc_recipient HOT 8
- Switching to SSL failed HOT 6
- Parsing failure. HOT 8
- Allow formatting of BCC addresses HOT 2
- when parsing the header of this mime crashed! HOT 14
- mailio stop working with vcpkg? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mailio.