Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

envelope doesn't parse more than 1 attachment #32

Open
MBR-0001 opened this issue Nov 23, 2020 · 2 comments
Open

envelope doesn't parse more than 1 attachment #32

MBR-0001 opened this issue Nov 23, 2020 · 2 comments
Labels

Comments

@MBR-0001
Copy link

MBR-0001 commented Nov 23, 2020

Emails sent from gmail with multiple attachments don't get parsed fully, only 1 of the attachments is "parsed"

Steps to reproduce

  1. Send an email with multiple attachments
  2. Parse it on the server

Code used

const envelope = require("envelope");
const fs = require("fs");

let parsed = envelope.parse(fs.readFileSync("./raw.txt"));

setInterval(() => {}, 1e6);

if (process.platform === "win32") {
    let r = require("readline").createInterface({
        input: process.stdin,
        output: process.stdout
    });

    r.on("line", line => {
        if (!line) return;

        try {
            let res = eval(line);
            console.log(res);
        }
        catch (ex) {console.log(ex);}        
    });
}
//allows easy inspection of the parsed email by just eval-ing stdin

Output

NtEjHNM.png

I can provide the "raw email" file if needed

@jhermsmeier
Copy link
Owner

Hey, thanks! A test email would be excellent - I currently don't have a whole lot of time on my hands, so having something to reliably reproduce would help a lot.

@MBR-0001
Copy link
Author

MBR-0001 commented Nov 25, 2020

Here's the raw file https://cdn.mbr.pw/bu4ZHba.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants