将电子邮件附件解析为我的SQL数据库的最简单方法 [英] The easiest way to parse an email attachment into my SQL database

查看:166
本文介绍了将电子邮件附件解析为我的SQL数据库的最简单方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在编写一个Windows应用程序,该应用程序从我公司的不同供应商那里获取价格/可用性信息.其中一些从URL分发其信息为XML或CSV,通过httpResponse/httpRequest获取它们后,我可以轻松地将其解析为SQL数据库.

但是,其中一些文件每天通过电子邮件发送一次文件附件.有没有一种我可以从我的C#应用​​程序中读取此附件的简单方法?我们有自己的Exchange服务器,该服务器与将运行该应用程序的应用程序服务器位于同一AD域中,但是我不知道这是否有帮助?

问候
Erlend Neergaard

Hi,

I''m writing a Windows app that fetches price-/availability information from my companys different suppliers. Some of them distribute their information as XML or CSV from an URL which I can easily parse into my SQL database after fetching them with httpResponse/httpRequest.

Some of them however, send a file attachment once a day by email. Is there a fairly easy way that I can read this attachment from my C# application? We have our own Exchange server that sits in the same AD-domain as the application server where the app will run, but I don''t know if that helps?

Regards
Erlend Neergaard

推荐答案

我想获取这些邮件的最简单方法是使用Exchange Web服务(EWS)
这些链接可能会帮助您:
Exchange Web服务托管API 1.2 SDK [使用EWS托管API获取附件 [ ^ ]
I guess the easiest way to fetch these mails is using the Exchange Web Services (EWS)
These links might help you:
Exchange Web Services Managed API 1.2 SDK[^]
Getting attachments by using the EWS Managed API[^]


这篇关于将电子邮件附件解析为我的SQL数据库的最简单方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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