将保存的 .msg 消息显示为 HTML 或 ASP.NET
我有一个问题。我需要一种方法从 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否考虑过使用第三方库来加载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.