Comments (11)
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.
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.
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.
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.
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.
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.
I guess. I think, I did some wrong interpretations what caused the problems, based on my short tests with this lib.
from exchangelib.
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.
Thank you very much for the quick fix!
from exchangelib.
and probably also
author
if that argument is passed toreply_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.
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)
- exchangelib.errors.ErrorAccessDenied: Not allowed to access Non IPM folder. HOT 23
- Can junk mail rules be created by exchangelib? HOT 1
- Validation rule error when manage inbox rules HOT 3
- `folder.parts` no longer returns root of hierarchy in list of parts (5.2.1) HOT 9
- `ErrorNonExistentMailbox` in version 5.2.1 but not in 5.2.0 HOT 6
- exchangelib.errors.UnauthorizedError: Invalid credentials for https://[domain].de/EWS/Exchange.asmx HOT 6
- Create calendar appointment in another account as access data, the appointment is created in the access account. HOT 3
- Get all Public Folders HOT 23
- ErrorInvalidSchemaVersionForMailboxVersion with exchangelib v5.2.1 and Exchange server version 15.2.1544.4 HOT 45
- EOF occurred in violation of protocol HOT 4
- ValueError trying to delete a rule HOT 2
- Error getting folders for v5.2.1+ (server 2010sp3 upd.29) HOT 3
- Cannot fetch calendar folder HOT 4
- Problem getting auth type from Exchange server HOT 15
- The request failed schema validation HOT 9
- Get more than 100 records with a.protocol.resolve_names HOT 1
- EWS does not support returning more than 100 results. See https://learn.microsoft.com/en-us/exchange/client-developer/web-service-reference/resolvenames-operation
- How to disable check_hostname HOT 5
- some new distinguished folders cause 500 error HOT 4
- Support Custom Authentication Domains for Global and Governmental Environments (gcc-high, dod, etc) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from exchangelib.