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

from_ attribute contains two tuples for one sender #107

Open
sgeulette opened this issue Feb 17, 2022 · 0 comments
Open

from_ attribute contains two tuples for one sender #107

sgeulette opened this issue Feb 17, 2022 · 0 comments

Comments

@sgeulette
Copy link

sgeulette commented Feb 17, 2022

Describe the bug
When headers['From'] = 'Adam, Valérie <valerie.adam@xxx.be>' , the produced from_ attribute contains [('', 'Adam'), ('Valérie', 'valerie.adam@xxx.be')]
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', 'valerie.adam@xxx.be')]

Raw mail
'Subject: test\nFrom: Adam, Valérie <adam.valerie@xxx.be>\nTo: yyy@xxx.be\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 sgeulette changed the title from_ attribute contains to tuples for one sender from_ attribute contains two tuples for one sender Feb 17, 2022
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

1 participant