保存附件 - 报告的文件名不正确 [英] Saving attachments - Incorrect filename reported

查看:100
本文介绍了保存附件 - 报告的文件名不正确的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好

我99%的时间都在保存附件而没有问题。  而不是使用我的代码,我将使用MS提供的代码。

I'm saving attachments 99% of the time without issue.  Rather than use my code, I'll use the code supplied by MS.

EmailToSaveAttachmentsFrom.Load()
If EmailToSaveAttachmentsFrom.HasAttachments AndAlso TypeOf EmailToSaveAttachmentsFrom.Attachments(0) Is FileAttachment Then
	Dim fileAttachment As FileAttachment = TryCast(EmailToSaveAttachmentsFrom.Attachments(0), FileAttachment)
	fileAttachment.Load()
	Console.WriteLine("FileName: " + fileAttachment.Name)
End If

对于某些电子邮件,未正确报告文件名。   .FileName等于Nothing,所以我使用.Name。  文件名是MyFile.EXP,但报告为< MyFile.EXP> .EXP

For certain emails the file name is not reported correctly.  .FileName is equal to Nothing, so I use .Name.  The file name is MyFile.EXP, but it is being reported as <MyFile.EXP>.EXP

如果我保存附件,则保存为MyFile.EXP.EXP

If I then save the attachment it saves as MyFile.EXP.EXP

<> ;?之间是否保存了真实的文件名?  为什么这样做只在某些电子邮件附件上?

Is the true filename held between the <>?  Why is it doing this and only on certain email attachments?

我们非常感谢任何帮助。

Any help would be greatly appreciated.

干杯

推荐答案

我试图通过以下方式重新解决问题在我的网站上阅读使用EWSEditor( http://ewseditor.codeplex.com )的GetItem和GetAttachment  电话上的附件详细信息Exchange Server 2010 SP1和
能够按预期获得附件名称的值(例如ews.exp)。

I have tried to repro the issue by reading the attachment details on both GetItem and GetAttachment  calls using EWSEditor (http://ewseditor.codeplex.com) on my Exchange Server 2010 SP1 and able to get value for Attachment Name as expected(e.g. ews.exp).

如果您看到不同,请与我们共享EWS请求/响应日志使用EWSEditor时的行为。

Pleaes share the EWS request/response logs with us if you see different behavior when using EWSEditor.

问候,

Brijs  

Brijs博客......超越明显


这篇关于保存附件 - 报告的文件名不正确的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆