Independentsoft 生成的 .msg 邮件在转发时丢失附件

发布于 2024-07-24 22:37:03 字数 1058 浏览 4 评论 0原文

我遇到了一个问题,说实话,我最初并不认为这是一个编程问题,但在检查了所有其他领域后,如果这可能是一个问题,我将不胜感激您的反馈。

我们有一个 ASP.NET Web 应用程序,用于向用户发送带有附件的电子邮件。 发送后,消息将在 SharePoint 中保存为 .msg 文件。 所有这些都正确可靠地工作。

我们发现的问题是,当用户打开 .msg 文件(即从 SharePoint 下载)然后转发它时,附件会从电子邮件中脱落。 附件位于 .msg 文件中,可以打开和查看 - 问题仅在他们转发时出现(当他们转发时文档消失)。

用户正在使用 Outlook(各种版本)和 Internet Explorer。

我已尝试以下方法来消除非编程解释:

  1. 转发实际发送的电子邮件 - 这有效(即保留附件)
  2. 从 msg 文件中获取内容和附件,发送然后转发 - 这有效
  3. 获取此电子邮件,上传到 SharePoint,下载并转发 - 这有效
  4. 获取生成的 .msg 文件并保存在本地。 打开并转发 - 这不起作用
  5. 从 SharePoint 打开生成的 .msg 文件 - 这不起作用
  6. 更改所有适当的信任/Intranet 设置 - 没有区别
  7. 转发生成的 .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:

  1. Forward the actual email sent - this works (i.e. attachments are kept)
  2. Take the content and attachment from msg file, send and then forward - this works
  3. Take this email, upload to SharePoint, download and forward - this works
  4. Take the generated .msg file and save locally. Open and forward - this does NOT work
  5. Open the generated .msg file from SharePoint - this does NOT work
  6. Change all the appropriate trust / intranet settings - no difference
  7. 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

眼藏柔 2024-07-31 22:37:03

这最终成为一个相当简单的解决方案。

在 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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文