-
Notifications
You must be signed in to change notification settings - Fork 44
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
Unable to download FileAttachment #55
Comments
Try load message first then try to find attachments.
|
Yes, I'm already doing this in the calling method like this (code is shortened for brevity):
|
This works for me
|
Thanks for your assistance @LubosVoska! I'm using the NuGet package 1.1.3 Do you see anything wrong with it? Should I integrate EWS by some other means? |
Try to use version 2.0.0. I am using 2.0.0-beta1 but there is newer version 2.0.0-beta2. |
FYI, 2.0.0-beta2 leads to another issue: opening a |
No joy. 2.0.0-beta1 has the same issue as 2.0.0-beta2.
And this is the offending code:
|
Unfortunately i don't have Exchange to test currrently. If you can give me (privately) a sample account + code that doesn't work I can check it. |
I'm in the same shoes; I'm using Office 365 but am initializing with
Is this the issue? Do I need a real MS Exchange, in my case version 2010 to accomplish what I'm after? FYI, I have to use 2010 as this is the production requirement. So far I'm developing in a lab environment, using Office 365. |
Try this
|
Ah, sorry @LubosVoska but you're getting out of context...I have no issues connecting with the mailbox and actually am receiving streaming notifications in real-time, searching items, moving stuff around, etc. All the email attributes received are as expected with the exception of the attachments which is the current issue... However, I just tried the above suggestion for |
This does not work in 1.1.3, because of missing |
Hi @mirecad, Related to the missing await for the Load functions: it has not been the only bug, if you take a look at on the souce code in the master branch, there are only dummy implementations for both Load method overrides: Should be the OfficeDev the official repo for the implementation? They neither seem to have an implemenation for the Load(Stream stream) and Load(string) methods. Has somebody already a fork, which has made some meaningful steps to solve the problem? |
For those who stay with the stable v1.1.3 from nuget.org:
` I simply use the async Load method of the base class, which works and loads the Content property with bytes of the file. |
hi @sherlock1982 , |
Look for prerelease packages: https://www.nuget.org/packages/Microsoft.Exchange.WebServices.NETStandard/2.0.0-beta2 |
According to AssemblyInfoOpenSource.cs the master branch is on the version 2.2.1 - still with missing/dummy implementation of Load(Stream stream) and Load(string fileName), that means, the upgrade to 2.0.0-beta2 cannot really solve the problem right?
|
I've started to fix the missing implementation, but I miss the information/documentation on the private member 'loadToStream'. I have the strong assumption, that this class member has nothing to do with referential integrity. I hope, nobody will have bad feelings about the removal of it from the method (it's simply useless). |
Hello!
I'm having a hard time downloading attachments.
The below code never downloads an attachment:
No error is thrown; the
attachment.Content
property is null, and the length of theMemoryStream
is 0. The metadata for the attachment is downloaded correctly though. I can obtain attachment filename, size, and content type.Please note, that the
EmailMessage message
argument is already bound to anExchangeService
by the calling method using theItemSchema.Attachments
amongst other schemas.Any help/insights would be greatly appreciated!
The text was updated successfully, but these errors were encountered: