Independentsoft 生成的 .msg 邮件在转发时丢失附件
我遇到了一个问题,说实话,我最初并不认为这是一个编程问题,但在检查了所有其他领域后,如果这可能是一个问题,我将不胜感激您的反馈。
我们有一个 ASP.NET Web 应用程序,用于向用户发送带有附件的电子邮件。 发送后,消息将在 SharePoint 中保存为 .msg 文件。 所有这些都正确可靠地工作。
我们发现的问题是,当用户打开 .msg 文件(即从 SharePoint 下载)然后转发它时,附件会从电子邮件中脱落。 附件位于 .msg 文件中,可以打开和查看 - 问题仅在他们转发时出现(当他们转发时文档消失)。
用户正在使用 Outlook(各种版本)和 Internet Explorer。
我已尝试以下方法来消除非编程解释:
- 转发实际发送的电子邮件 - 这有效(即保留附件)
- 从 msg 文件中获取内容和附件,发送然后转发 - 这有效
- 获取此电子邮件,上传到 SharePoint,下载并转发 - 这有效
- 获取生成的 .msg 文件并保存在本地。 打开并转发 - 这不起作用
- 从 SharePoint 打开生成的 .msg 文件 - 这不起作用
- 更改所有适当的信任/Intranet 设置 - 没有区别
- 转发生成的 .msg - 收到时文件仍然丢失
使用标准 SmtpClient 发送电子邮件功能,我认为*这不应该是我需要解决的领域。 我们正在使用名为 Independentsoft 的第三方组件来生成 .msg 文件,我认为这可能是我们需要帮助的领域。
摘录相当简单:
Message mailMsg = new Message(); // configuration, set email addresses, etc... foreach (Document doc in msg.Documents) { Attachment attachment = new Attachment(doc.Path); mailMsg.Attachments.Add(attachment); }
任何关于可能导致此问题的想法将不胜感激
I have got an issue that to be honest I initially did not think was a programming issue, but after checking all other areas I would appreciate your feedback if this could possibly be one.
We have an ASP.NET web application that sends emails with attachments to users. Once sent the message is saved as a .msg file in SharePoint. All of this works correctly and reliably.
The issue we have found is that when a user opens the .msg file (i.e. downloads it from SharePoint) and then forwards it the attachments fall off the email. The attachments are in the .msg file, and can be opened and viewed - the issue is ONLY when they forward it (the docs disappear when they press forward).
Users are using Outlook (a variety of versions) and Internet Explorer.
I have tried the following to eliminate non-programming explanations:
- Forward the actual email sent - this works (i.e. attachments are kept)
- Take the content and attachment from msg file, send and then forward - this works
- Take this email, upload to SharePoint, download and forward - this works
- Take the generated .msg file and save locally. Open and forward - this does NOT work
- Open the generated .msg file from SharePoint - this does NOT work
- Change all the appropriate trust / intranet settings - no difference
- Forward the generated .msg - files are still missing when recieved
Emails are sent using standard SmtpClient functionality, I don't think* this should be the area I need to address. We are using a third party component called Independentsoft to generate our .msg file, I think this is likely to be the area we need assistance on.
The extract for this is fairly simple:
Message mailMsg = new Message(); // configuration, set email addresses, etc... foreach (Document doc in msg.Documents) { Attachment attachment = new Attachment(doc.Path); mailMsg.Attachments.Add(attachment); }
Any thoughts on what might be causing this would be much appreciated
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这最终成为一个相当简单的解决方案。
在 Message 类中存在一个名为 MessageFlags 的集合。 只需在需要时添加 MessageFlag.HasAttachment
This ended up being a fairly simple resolution.
On the Message class a collection exists called MessageFlags. Simply add the MessageFlag.HasAttachment when required