简体   繁体   English

我应该如何获取和处理(Exchange)电子邮件附件?

[英]How should I go about getting and processing an (Exchange) email attachment?

I need to get a zip file from an email attachment, unzip it and copy it somewhere. 我需要从电子邮件附件中获取一个zip文件,将其解压缩并复制到某个地方。

What would be the way I should go about it? 我应该怎么做呢?

I'm currently googling around things like 'Exchange API' and 'processing email attachments' and kind of hoping this kind of thing has been done before. 我目前正在搜索“ Exchange API”和“处理电子邮件附件”之类的内容,并且希望这种事情之前已经完成。

The environment will be Windows and Exchange 2003, and any coding will preferably be in C#. 环境将是Windows和Exchange 2003,并且任何编码都最好使用C#。

I had to do this some time ago, and the best way is to use WEBDAV. 我前一段时间不得不这样做,最好的方法是使用WEBDAV。 Every mail item can be referenced like a URL. 每个邮件项目都可以像URL一样被引用。

If you check out this blog post on WEBDAV , it should show you the way. 如果您在WEBDAV上查看此博客文章 ,它应该向您显示方法。

I did this in the end using Redemption I had a couple of problems, hence the linked question but got there in the end. 最后,我使用“ 救赎”做到了这一点,我遇到了几个问题,因此存在相关问题,但最终还是到了。

You do need to have the Outlook client installed, and you need full mailbox rights (not just read) on whatever mailbox you are trying to access. 您确实需要安装Outlook客户端,并且需要对要尝试访问的任何邮箱具有完全邮箱权限(而不仅仅是读取权限)。

This question, Read MS Exchange email in C# asked a couple of weeks after mine got some good answers as well. 在我也得到一些很好的答案后的几个星期,这个问题( 用C#读取MS Exchange电子邮件)问了几个问题。

Assuming you want to do this in .NET you will either have to write or purchase a POP3 or IMAP4 class library to communicate with the Exchange server. 假设您要在.NET中执行此操作,则必须编写或购买POP3或IMAP4类库才能与Exchange服务器通信。

Here is one example of a POP3 client from CodeProject: http://www.codeproject.com/KB/IP/despop3client.aspx 这是CodeProject上的POP3客户端的一个示例: http : //www.codeproject.com/KB/IP/despop3client.aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM