SY.EmailHelper 1.0.0

dotnet add package SY.EmailHelper --version 1.0.0
                    
NuGet\Install-Package SY.EmailHelper -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SY.EmailHelper" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SY.EmailHelper" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="SY.EmailHelper" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SY.EmailHelper --version 1.0.0
                    
#r "nuget: SY.EmailHelper, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SY.EmailHelper@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SY.EmailHelper&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=SY.EmailHelper&version=1.0.0
                    
Install as a Cake Tool

EmailManager

介绍

基于.NetCore3.1的 包含IMAP、POP3、Exchange、SMTP协议的跨平台收发邮件系统

MailKit

这是一个基于MimeKit的跨平台.NET邮件库,支持IMAP、POP3、SMTP协议。它相比.NET自带的SmtpClient,支持更广泛的协议和更现代的电子邮件标准。因此微软官方建议,SmtpClient只用来兼容老应用,如果开发新应用的话,直接使用MailKit。

因此本系统中采用了MailKit来做邮件的收发!

mimekit

Exchange

Exchange:微软推出的邮件服务器软件。

Exchange Server 是微软公司的一套电子邮件服务组件,是个消息与协作系统。 简单而言,Exchange server可以被用来构架应用于企业、学校的邮件系统。

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)

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp3.1 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 498 7/6/2021