将保存的 .msg 消息显示为 HTML 或 ASP.NET

发布于 2024-12-09 09:48:07 字数 339 浏览 0 评论 0原文

我有一个问题。我需要一种方法从 Outlook 导入保存的 .msg 文件,然后将其显示为 html。

理想情况下,我会有一个 ASP:FileUpload 控件,用户可以上传电子邮件。然后我想将其解析为标记,以便电子邮件可以显示在网站中。我只是不知道如何提取此电子邮件并将其作为新的 MailMessage 对象传递。

如果我可以将文件上传中的数据作为新的 MailMessage 对象引入,我想我可以从文件中读取信息并显示它。

必须有一种方法可以用 C# 显示 .msg 的内容。我无法想象没有。我真的不想使用第三方插件或 .dll 文件。我感觉 C# 已经以某种方式内置了这个功能。 (也许包括参考文献之一?)

I have a problem. I need a way to import a saved .msg file from Outlook and then display this as html.

Ideally I would have an ASP:FileUpload control that the user would upload the email. Then I would want to parse this as markup so the email can be displayed in the website. I just don't know how to go about pulling this email message in and passing it as a new MailMessage object.

If I could bring the data from the file upload in as a new MailMessage object I would imagine I could read the information from the file and display this.

There has to be a way to display the contents of a .msg with C#. I can't imagine there isn't. I would REALLY like to not use third party plug-ins or .dll files. I have a feeling C# has this functionality somehow built into it. (maybe include one of the references?)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

故事还在继续 2024-12-16 09:48:07

您是否考虑过使用第三方库来加载MSG文件,然后检索消息的内容? Aspose.Email 可能可以为你做那件事。

Have you considered using a third-party library to load the MSG file, and then retrieve the content of the message? Aspose.Email can probably do that for you.

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