Giter VIP home page Giter VIP logo

Comments (11)

claell avatar claell commented on September 26, 2024

https://github.com/ecederstrand/exchangelib/blob/master/exchangelib/items/message.py#L145 <- This seems to be the problematic part. Also, can it happen that this logic will lead to having no recipients at all?

from exchangelib.

ecederstrand avatar ecederstrand commented on September 26, 2024

I can't recall why that code was added. Since a Message item has both sender and author fields, it could be that it was added in case those two fields are different. We could add a check that they are at least different. And also add sender or author when to_recipients is empty?

from exchangelib.

claell avatar claell commented on September 26, 2024

Seems like it was added after #522 (comment) in bb59272. In the comment, you say:

I agree that reply_all() should default to sending to both self.to_recipients and self.author.

Not sure, why, though.

The code doesn't use sender as of now, so not sure, can this be a reason for it, then?

from exchangelib.

ecederstrand avatar ecederstrand commented on September 26, 2024

When you have a message in your inbox, then sender and/or author will contain the person who sent the email. When you reply to all, wouldn't you expect that person to be in to_recipients? Or maybe I'm misunderstanding something?

from exchangelib.

claell avatar claell commented on September 26, 2024

Ah, possibly, I misunderstood the meaning of self.author. I thought that field always referred to me, not the message author. Now, it makes sense to me. Still, somehow, the behavior is broken. Maybe, it's because I am (of course) on the recipients of the email. So then, when I send the reply, I am added back to it, which is unwanted.

I had a test email sent from me to my account. When I used reply_all, it had me listed twice for the recipients.

Also, on another email, I was added to the recipients of reply_all (there only once; I guess because I wasn't sender of the original email).

from exchangelib.

ecederstrand avatar ecederstrand commented on September 26, 2024

Ah, so you want self.account.primary_smtp_address removed from to_recipients, and probably also author if that argument is passed to reply_all(). That makes sense.

from exchangelib.

claell avatar claell commented on September 26, 2024

I guess. I think, I did some wrong interpretations what caused the problems, based on my short tests with this lib.

from exchangelib.

claell avatar claell commented on September 26, 2024

Looks that I tested with two edge cases, before, and I interpreted things not in a correct way.

The first test was with an email sent from me to me. There, the reply_all adds me twice to recipients. Expected behavior: Only add me once (but don't remove me completely, because I was the only sender of the email).

The second test was a reply to an email sent from a mailing list on behalf of me. There, I also was added as recipient for reply_all; probably because the email was sent on behalf of me. Not sure what the expected behavior would be in such cases. In the current case, I didn't want me as recipient of my reply, but there might be other cases where that is wanted?

A new test with a more normal scenario: I was in the recipients of the email (CC). In the reply_all email, I am also in CC of that email. This is unwanted.

I hope, this more detailed description helps a bit with improving the current situation.

from exchangelib.

claell avatar claell commented on September 26, 2024

Thank you very much for the quick fix!

from exchangelib.

claell avatar claell commented on September 26, 2024

and probably also author if that argument is passed to reply_all(). That makes sense.

That part, which I now finally understand, is still not implemented from what I see. For me, it is not really relevant right now. Just wanted to add a note, so it's not forgotten.

from exchangelib.

claell avatar claell commented on September 26, 2024

I recently discovered a problem with the fix: The order of the recipients is not the same as in Outlook. I need to check again, what exactly is happening in which case.

from exchangelib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.