# EmailManager **Repository Path**: soasoft/email-manager ## Basic Information - **Project Name**: EmailManager - **Description**: 基于.NetCore3.1的 包含IMAP、POP3、Exchange、SMTP协议的跨平台收发邮件系统 - **Primary Language**: C# - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2021-12-12 - **Last Updated**: 2021-12-12 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # EmailManager #### 介绍 基于.NetCore3.1的 包含IMAP、POP3、Exchange、SMTP协议的跨平台收发邮件系统 #### MailKit 这是一个基于MimeKit的跨平台.NET邮件库,支持IMAP、POP3、SMTP协议。它相比.NET自带的SmtpClient,支持更广泛的协议和更现代的电子邮件标准。因此微软官方建议,SmtpClient只用来兼容老应用,如果开发新应用的话,直接使用MailKit。 因此本系统中采用了MailKit来做邮件的收发! [mimekit](http://www.mimekit.net/) #### Exchange Exchange:微软推出的邮件服务器软件。 Exchange Server 是微软公司的一套电子邮件服务组件,是个消息与协作系统。 简单而言,Exchange server可以被用来构架应用于企业、学校的邮件系统。 [Exchange](https://docs.microsoft.com/en-us/exchange/client-developer/exchange-web-services/explore-the-ews-managed-api-ews-and-web-services-in-exchange) #### 使用说明 1. 在单元测试项目中,ConfigSetting中添加相应的邮箱配置即可, eg 163邮箱: //IMAP配置 public static string IMApServer = "imap.163.com"; public static int IMAPPort = 993; public static bool IMAPIsSsl = true; public static string IMAPAccount = ""; public static string IMAPPassword = ""; 在IMAPAccount和IMAPPassword处填上自己的邮箱账号和密码,即可测试收邮件。 2 . 邮件发送 传入邮件实体(发件人、收件人/抄送人、主题、内容)和邮箱配置(smtp服务器地址和端口、账号、密码) public static SendResultEntity Send(EmailModel messge, ServerConfigurationEntity serverConfigurationEntity)