[英]Extract Email Attachments from Outlook (exchange server) using C#
Extract Email Attachments from Outlook (exchange server) using C# 使用C#从Outlook(交换服务器)提取电子邮件附件
I need to run a script or Service - Which can automatically deduct the attachment file from a Specific Email Id ( admin@admin.com). 我需要运行脚本或服务-可以自动从特定电子邮件ID(admin@admin.com)中扣除附件文件。
Attachment file will be .zip format. 附件文件将是.zip格式。
I need to Unzip this file.. I need to do this task completely in an automated format. 我需要解压缩该文件。我需要完全以自动化格式完成此任务。
On an average, I will receive only one email in a week. 平均而言,我一周只收到一封电子邮件。
I need to write the program in C#.Net...! 我需要在C#.Net中编写程序...!
Kindly help me by sharing your logics ... Many thanks in advance..! 请分享您的逻辑,以帮助我。在此先感谢您!
While this is fairly broad... Don't try to go through Outlook; 尽管范围相当广泛……不要尝试通过Outlook; there are easier ways.
有更简单的方法。 I'd Google for the following:
我希望Google提供以下服务:
C# IMAP C#IMAP
C# POP3 C#POP3
ICSharpCode.net (zip) ICSharpCode.net (zip)
Regarding connecting to Exchange server mailbox and checking attachments of email messages, you can use Aspose.Network library, a 3rd party .NET component. 关于连接到Exchange服务器邮箱并检查电子邮件附件,可以使用Aspose.Network库,它是第三方.NET组件。 More details are available at http://www.aspose.com/documentation/.net-components/aspose.network-for-.net/managing-emails-on-exchange-server.html
有关更多详细信息,请访问http://www.aspose.com/documentation/.net-components/aspose.network-for-.net/managing-emails-on-exchange-server.html
I highly recomment Outlook Redemption which is a COM library to access outlook and Exchange through MAPI. 我强烈推荐Outlook Redemption ,它是一个通过MAPI访问Outlook和Exchange的COM库。 Since its COM you should be able to easily use it from C# .NET
由于它的COM,您应该可以从C#.NET轻松使用它
I have implemented quite exactly this on a project (though it was in Java). 我已经在一个项目中实现了这个功能(尽管它是在Java中实现的)。
We just used an IMAP client library to grab the mails, then Java's mail libraries to extract ZIP attachments and decompress them. 我们只是使用IMAP客户端库来获取邮件,然后使用Java的邮件库来提取ZIP附件并将其解压缩。
The same should work in C#; 在C#中也应如此; the advantage being that you do not rely on Exchange, just on IMAP, which means you don't tie yourself to Exchange.
优点是您不依赖Exchange,而仅依赖IMAP,这意味着您不必依赖Exchange。 You might however ask the admin to activate IMAP on the Exchange server.
但是,您可以要求管理员在Exchange服务器上激活IMAP。
Also, you'll need to find an IMAP library for C#; 另外,您还需要找到C#的IMAP库; don't know if there is one.
不知道有没有。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.