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

SimpleParser - References field value is string instead of array #289

Open
sujithcphilip opened this issue Feb 1, 2021 · 1 comment
Open

Comments

@sujithcphilip
Copy link

The references field in SimpleParser result is of type string (message IDs separated by comma) instead of array, when parsed an office 365 outlook email.

value in references is like "c490b551-830a-45bf-1761-xxxxxxxxxxxx@xxxxxx.rocket-cx.com,010001775c5a1324-b73d4ddf-1015-xxxx-94ac-02c4abxxxxxx-xxxxxx@email.amazonses.com"

{
....
inReplyTo:'<010001775c5a1324-b73d4ddf-1015-xxxx-94ac-02c4abxxxxxx-xxxxxx@email.amazonses.com>'
messageId:'<VI1PR05MB6734642888B8417CC3193xxxxxxxx@VI1PRxxxxxxxx.eurprd05.prod.outlook.com>'
references:'<c490b551-830a-45bf-1761-xxxxxxxxxxxx@xxxxxx.rocket-cx.com>,<010001775c5a1324-b73d4ddf-1015-xxxx-94ac-02c4abxxxxxx-xxxxxx@email.amazonses.com>'
...
}

It is working fine for emails from Gmail.

@CiscoKidxx
Copy link

CiscoKidxx commented May 4, 2021

@sujithcphilip - Running into same issue. Gonna hack around it but wanted to confirm your findings.

Amazon WorkMail:

    'references' => [
      '<90985eb4-624b-b382-92ca-019aaebdd67c@dextr.cloud>',
      '<0101017939804172-ac5e5a2a-de16-4af6-ad2b-76cd0a972dc4-000000@us-west-2.amazonses.com>',
      '<00bf01d74135$801dfcc0$8059f640$@dextr.cloud>'
    ]

O365:

'references' => '<da242f64-d663-7692-00c1-16057147ba49@dextr.cloud>,<01010179398d1416-3be6e3cc-d6ac-4506-9452-e796d556ea61-000000@us-west-2.amazonses.com>'

Hack:

      let refs = parsedMessage.headers.get("references");

      if (typeof refs == "string") {
        parsedMessage.headers.set("references", refs.split(","));
      }

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

No branches or pull requests

2 participants