简体   繁体   English

使用C#从Outlook(交换服务器)提取电子邮件附件

[英]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.

相关问题 C#-使用不同的按钮将附件添加到Outlook电子邮件时出现问题 - C# - Trouble adding attachments to outlook email using different buttons c# - 以编程方式从outlook电子邮件中删除附件 - c# - Programmatically remove attachments from outlook email 使用C#提取Outlook传递失败电子邮件主题和收件人 - Extract Outlook delivery failure email subjects and recepients using C# C# VSTO Outlook 插件 - 如何使用传出 Z0C83ZEFA57C7831CEB7B24 获取发送方的 email 地址? - C# VSTO Outlook plugin - How can I get the email address of the sender of an outgoing email using Exchange? C#-EWS-在Exchange服务上为Outlook电子邮件设置自定义属性 - C# -EWS - Setting custom properties on Exchange service for Outlook email 如何从Outlook Exchange Server(C#)获取约会的约会正文? - How to get appointment body text for an appointment from outlook exchange server(EWS),c#? 如何使用C#从Outlook中删除电子邮件? - How to delete an email from Outlook using C#? 使用 Outlook 的 C# 发送 Email - Send Email from C# using Outlook's 如何从C#中的Outlook仅保存Excel附件? - How to save only Excel attachments from outlook in C#? 阻止用户通过C#代码删除Outlook中的附件 - Stop users from deleting attachments in outlook through C# code
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM