Giter Club home page Giter Club logo

Comments (10)

mat-sz avatar mat-sz commented on May 26, 2024

Could you, please, share an example of such message?

from letterparser.

arunrreddy avatar arunrreddy commented on May 26, 2024

It has some sensitive info. Can I send it over mail?

from letterparser.

mat-sz avatar mat-sz commented on May 26, 2024

Got it! Thanks. Will work on the issue tomorrow.

from letterparser.

arunrreddy avatar arunrreddy commented on May 26, 2024

ok cool. Thanks a ton.

from letterparser.

arunrreddy avatar arunrreddy commented on May 26, 2024

Since headers are failed to being passed sometimes, this could be a good strategy if the existing logic ends in an error. If a header name is found on a specific line and the header value condition check fails, search the immediate next line for a value and capture that as the header value, otherwise throw any error.

from letterparser.

mat-sz avatar mat-sz commented on May 26, 2024

Patch published with version 0.0.4.

from letterparser.

arunrreddy avatar arunrreddy commented on May 26, 2024

Tried 0.0.4 version. Getting the same error still. It fails to parse the below lines.

Date: Fri, 30 Oct 2020 19:28:52 +0000
Message-ID:
DM5PR03MB32105C813B31150ED43297499B150@DM5PR03MB3210.namprd03.prod.outlook.com
References:
01000175757e79fd-1e262982-ff5a-4ace-b0c6-267c0d2a12cf-000000@email.amazonses.com
In-Reply-To:
01000175757e79fd-1e262982-ff5a-4ace-b0c6-267c0d2a12cf-000000@email.amazonses.com

from letterparser.

arunrreddy avatar arunrreddy commented on May 26, 2024

I can see that there is a space before the three keys on the new line as well.

from letterparser.

mat-sz avatar mat-sz commented on May 26, 2024

The raw email you've sent me parses just fine on 0.0.4. (Saved it to file, read using readFileSync and parsed using letterparser.parse()).

from letterparser.

arunrreddy avatar arunrreddy commented on May 26, 2024

Still failing with the below error. "err":{"message":"Unexpected space at the beginning of line 51","name":"Error","stack":"Error: Unexpected space at the beginning of line 51\n at parseHeaders (/root/workspace/example-api/node_modules/letterparser/lib/parser.js:95:23)\n at Object.parseBody (/root/workspace/example-api/node_modules/letterparser/lib/parser.js:135:21)\n at parse (/root/workspace/example-api/node_modules/letterparser/lib/index.js:32:30)\n

from letterparser.

Related Issues (16)

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.