Comments (10)
I think the best option to find out what the difference between sending an item attachment from exchange and from Outlook is to create two identical emails , one from each system, and then use exchangelib to inspect all attriburtes on the two items to find out what the difference is.
from exchangelib.
First of all.
Thank you very much for your help :)
For the attributes I am not sure what code line to use.
print([f.name for f in Message.FIELDS if f.is_searchable])
I tried this one with
for f in nachricht.FIELDS:
fw.write(f'{f.name} = {str(f)}')
with "fw" as a filewrite for a .txt document
The content is big and I do not know if it helps.
If you have a better approach for the needed information let me know.
attribute_0.txt
attribute_1.txt
from exchangelib.
I was thinking of something along these lines:
from exchangelib.items import Message
item_from_exchangelib = account.inbox.get(subject="Hello from exchangelib")
item_from_outlook = account.inbox.get(subject="Hello from outlook")
for f in Message.FIELDS:
exchangelib_val = getattr(item_from_exchangelib, f.name)
outlook_val = getattr(item_from_outlook, f.name)
if exchangelib_val != outlook_val:
print(f"Diff on field {f.name}. exchangelib: {exchangelib_val!r} Outlook: {outlook_val!r}")
from exchangelib.
I got this textfile with the print content.
To the previous tests I reduced the mail to just the attached mail, your suggested subject, "test" as the body and the attached mail itself is very "plain" in its structure.
Hopefully this helps with finding a solution.
from exchangelib.
The text file only reports mime_content
as being different, and that field is auto-generated. That doesn't get us any further, unfortunately.
from exchangelib.
Sorry my mistake. I did not format it in any way.
A little usage of notepad++ later and I got hopefully the same content just being displayed in a better way.
Now the document follows
Diff on field field.name
exchangelib: exchangelib value
Outlook: outlook value
some values are ... very long.
from exchangelib.
The main difference I see is in the attachment:
exchangelib: [ItemAttachment(attachment_id=AttachmentId(id='AAMkADAzOWRmZmE2LWQ0OGYtNGNkOS1hYmMyLWU4MDU4ZGQxNjE0YwBGAAAAAAAqnHhcvxtCR7EVdJ/LFX5nBwC7iw9ZYLsmS4aOWEeRaxxvAAAAAAEMAAC7iw9ZYLsmS4aOWEeRaxxvAAACxrxWAAABEgAQADuaG27ZFkREkFoN0X7Hze8=', root_id=None, root_changekey=None), name='Test', content_type='application/octet-stream', content_id=None, content_location=None, size=4242, last_modified_time=EWSDateTime(2024, 2, 27, 14, 45, 44, tzinfo=EWSTimeZone(key='Europe/Berlin')), is_inline=False)]
Outlook: [ItemAttachment(attachment_id=AttachmentId(id='AAMkADAzOWRmZmE2LWQ0OGYtNGNkOS1hYmMyLWU4MDU4ZGQxNjE0YwBGAAAAAAAqnHhcvxtCR7EVdJ/LFX5nBwC7iw9ZYLsmS4aOWEeRaxxvAAAAAAEMAAC7iw9ZYLsmS4aOWEeRaxxvAAACxrxXAAABEgAQADz+vaxnVItFpGTwDeWWFpI=', root_id=None, root_changekey=None), name='Test', content_type=None, content_id=None, content_location=None, size=20814, last_modified_time=EWSDateTime(2024, 2, 27, 14, 46, 28, tzinfo=EWSTimeZone(key='Europe/Berlin')), is_inline=False)]
Main thing here is the difference in size and content_type. I don't know what causes that. Are you attaching the same message in both emails?
from exchangelib.
Yes I do attach the same message.
The attached mail has the subject = "Test", body = "Test" and no attachments itself. Very plain and simple.
What can I further do to help solving this issue?
from exchangelib.
I don't have any obvious ideas.
I don't really consider this a bug, since it's not a goal of exchangelib to have feature parity with Outlook, but please do post your solution here if you find one.
from exchangelib.
Closing, but it would still be great if you post any solution here so others can benefit :-)
from exchangelib.
Related Issues (20)
- Linting error: `account.inbox.filter(...)` HOT 9
- Problem when access delegate inbox. HOT 1
- Incorrect "field_uri" in BaseFolder._distinguished_id HOT 1
- error in function to_xml in fields.AppointmentStateField HOT 7
- Error creating inbox rules HOT 4
- Multiple Email address inbox Stream subscription HOT 1
- Unnable to access shared calendar without permission on the mailbox root folder HOT 6
- Error in conver rule from xml
- Typo in Exchange 2019 version HOT 1
- Can't browse public_folders_root anymore HOT 32
- 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
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.