Skip to content

Parser behaving different on Linux vs Windows #136

@ghost

Description

Describe the bug
We are seeing unusually behaviour of mail-parser email object.
I executed below code on two separate OS. I am getting different output as per OS.

Additional context
Sample to test: test.zip
Email file is inside zip.

To Reproduce
Steps to reproduce the behavior:

import mailparser
import json

with open("test.eml", "rb") as f:
    eml = f.read()

email = mailparser.parse_from_bytes(eml)
print("\n== FROM ==")
print(email.from_)  # list of (name, email)

Output on Windows 11:

    "From": [
        [
            "",
            "[email protected]"
        ],
        [
            "",
            "[email protected]"
        ]
    ],

Output on Linux (Ubuntu):

    "From": [
        [
            "",
            ""
        ]
    ],

Expected behavior
Both output should be same output (regardless of OS it run on).

Environment:

  • OS: Linux Ubuntu 22.04, Windows 11
  • Docker: no
  • mail-parser [4.1.2]

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions