以编程方式处理新电子邮件和存储附件的最佳方法是什么
我有几个客户/供应商通过电子邮件向我分发报告。其中一些文件非常巨大,需要从电子邮件中删除并保存在文件共享上进行处理,以及控制邮箱大小。
任何人都可以提供有关自动下载和保存附件的推荐方法的指导吗?
我处于 MS Windows 环境(客户端和服务器计算机)中。电子邮件位于 Microsoft Exchange 2003 电子邮件服务器上。
优先使用 Microsoft 技术以实现解决方案之间的一致性 (C#),但是我愿意接受任何建议,无论是 C#、VBScript、Perl、Java、我应该购买的组件等
。 每天 [email protected] 会发送一封主题为“Activ”的电子邮件政府报告YYYY-MM-DD”给我 [email protected]
每封电子邮件都有一个名为“ActivityReport-YYYY-MM”的附件-DD-HH-MI-SS.xls”我需要将其保存在我的文件系统上 “C:\FilesFromBob\ActivityReport-YYYY-MM-DD-HH-MI-SS.xls”
提前感谢您的帮助。
I have several clients/vendors that distribute reports to me via email. Some of these files are enormous, and need to be removed from email and saved on a file share for processing, as well as to control mailbox size.
Can anyone provide guidance on their recommended method of automatically downloading and saving attachments.
I am in a MS Windows Environment (Client & Server Computers). Emails are on an Microsoft Exchange 2003 Email Server.
Preferred use of Microsoft Technology for consistency across solutions (C#), however I am open to any suggestions, be it C#, VBScript, Perl, Java, Components I should purchase, etc..
Scenario
Each Day [email protected] sends an email with the subject "Activity Report for YYYY-MM-DD" to me at
[email protected]
Each Email has an attachment named "ActivityReport-YYYY-MM-DD-HH-MI-SS.xls" which I need to save on my filesystem at
"C:\FilesFromBob\ActivityReport-YYYY-MM-DD-HH-MI-SS.xls"
Thanks in advance for any assistance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Exchange 2003 提供了一个WebDav API,您可以使用它从用户帐户访问电子邮件、联系人等。
SO 上已经有一些关于访问用户的 Exchange 收件箱的答案。我之前已经将这种方法用于几乎完全符合您概述的情况,一旦您制定出 WebDav API 模型以及请求和响应的结构,提取电子邮件及其附件就不会太困难。
还有其他与 Exchange 2003 交互的方法(此处概述),但我只尝试过 WebDav 方法,因为它似乎是最可靠的。
Exchange 2003 provides a WebDav API which you can use to access emails, contacts etc.. from a user's account.
There's a few answers about accessing a user's Exchange inbox on SO already. I've previously used this approach for almost exactly the situation you outline, and once you work out the WebDav API model and the structure of the requests and responses, it's not too difficult to extract emails and their attachments.
There are other ways to interact with Exchange 2003 (outlined on SO here), but I've only tried the WebDav approach because it seemed the most reliable.
我终于编写了存储来自 Outlook 的邮件的代码
不幸的是,此代码在 Outlook 中运行,因此 Outlook 必须打开。
我还没有研究如何安排跑步,但现在很容易做到
I finally wrote the code to store messages from Outlook
Unfortunately this code runs from within Outlook, so Outlook has to be open.
I did not yet investigate how to schedule the run, but now its easy to do