Skip to content

sent_from arg not works at some emails #243

Description

@fakeastap

Hello.
I ran into a problem. The sent_from attribute does not work correctly on some mail domains - specifically on gazeta.pl.

I have encountered exactly the same problem in the imaplib library. But I decided to write here.

    client = Imbox(“imap.gazeta.pl”, “meganwalters5225@gazeta.pl”, “q3nDgRjmtzrMUh9f”)
    messages = client.messages()
    for uid, message in messages:
        print(f“{uid} -> {message.sent_from}”)

This code works correctly. We see the following log:

b'1' -> [{'name': 'Zespół Gazeta.pl', 'email': 'pomoc@grupagazeta.pl'}]
b'2' -> [{'name': 'GMX Sicherheit', 'email': 'mailings@sicher.gmx.net'}]
b'3' -> [{'name': 'GMX Sicherheit', 'email': 'mailings@sicher.gmx.net'}]
b'4' -> [{'name': 'GMX Sicherheit', 'email': 'mailings@sicher.gmx.net'}]
b'5' -> [{'name': 'GMX Sicherheit', 'email': 'mailings@sicher.gmx.net'}]

But if we do a search by sender, which we can see perfectly well in the search for all emails - we get an empty answer.

    client = Imbox("imap.gazeta.pl", "meganwalters5225@gazeta.pl", "q3nDgRjmtzrMUh9f")
    messages = client.messages(sent_from="mailings@sicher.gmx.net")
    for uid, message in messages:
        print(f"{uid} -> {message.sent_from}")

And of course I realize that it is possible to get the answer I need by going through all the emails. But this is, to put it mildly, a horror for an account with a lot of emails.

You all can check the behavior of the code personally with my email and password in the topic
Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions