mail-parser icon indicating copy to clipboard operation
mail-parser copied to clipboard

from_ attribute contains two tuples for one sender

Open sgeulette opened this issue 3 years ago • 0 comments

Describe the bug When headers['From'] = 'Adam, Valérie <[email protected]>' , the produced from_ attribute contains [('', 'Adam'), ('Valérie', '[email protected]')] This is a mail sent by office365

To Reproduce Steps to reproduce the behavior:

  1. import mailparser
  2. mail = mailparser.parse_from_file(f)
  3. print(mail.from_)
  4. See error

Expected behavior from_ value must be [('Adam, Valérie', '[email protected]')]

Raw mail 'Subject: test\nFrom: Adam, Valérie <[email protected]>\nTo: [email protected]\nContent-Type: text/plain; charset="utf-8"\nContent-Transfer-Encoding: 7bit\nMIME-Version: 1.0\n\nmore\n'

Environment:

  • OS: Linux
  • Docker: no
  • mail-parser version: 3.15.0

Additional context nothing else

sgeulette avatar Feb 17 '22 10:02 sgeulette