mail-parser
mail-parser copied to clipboard
from_ attribute contains two tuples for one sender
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:
-
import mailparser
-
mail = mailparser.parse_from_file(f)
- print(mail.from_)
- 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