Git Product home page Git Product logo

Comments (6)

xguerin avatar xguerin commented on May 20, 2024

Ref: https://en.wikipedia.org/wiki/MIME#Encoded-Word

from mailio.

karastojko avatar karastojko commented on May 20, 2024

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.

xguerin avatar xguerin commented on May 20, 2024

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.

karastojko avatar karastojko commented on May 20, 2024

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.

karastojko avatar karastojko commented on May 20, 2024

@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.

xguerin avatar xguerin commented on May 20, 2024

Thanks ! That fixes it for that particular header.

from mailio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.