mirror of
https://github.com/ldqk/Masuit.Tools.git
synced 2026-10-29 12:43:16 +08:00
merge
This commit is contained in:
@@ -4,11 +4,16 @@
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="DateTimeExt\CCalendarData.xml" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AngleSharp" Version="0.9.9" />
|
||||
<PackageReference Include="HtmlSanitizer" Version="4.0.181" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
|
||||
<PackageReference Include="StackExchange.Redis" Version="1.2.6" />
|
||||
<PackageReference Include="System.Data.SqlClient" Version="4.4.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -4,4 +4,10 @@
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MongoDB.Bson" Version="2.4.4" />
|
||||
<PackageReference Include="MongoDB.Driver" Version="2.4.4" />
|
||||
<PackageReference Include="MongoDB.Driver.Core" Version="2.4.4" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
+22
-1
@@ -1,12 +1,18 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.26430.15
|
||||
VisualStudioVersion = 15.0.27004.2009
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Masuit.Tools", "Masuit.Tools\Masuit.Tools.csproj", "{275D5A0D-C49C-497E-A4B5-F40285C2495F}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test", "Test\Test.csproj", "{91954D82-A5FC-417B-8FD9-D9C165C8F16C}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Masuit.Tools.NoSQL.MongoDBClient", "Masuit.Tools.NoSQL.MongoDBClient\Masuit.Tools.NoSQL.MongoDBClient.csproj", "{1D45BDC4-74C4-4356-8B93-7F7A09106BB8}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Masuit.Tools.Core", "Masuit.Tools.Core\Masuit.Tools.Core.csproj", "{149E6872-CE95-493B-B136-535E64C65A49}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Masuit.Tools.NoSQL.MongoDBClient.Core", "Masuit.Tools.NoSQL.MongoDBClient.Core\Masuit.Tools.NoSQL.MongoDBClient.Core.csproj", "{85EEA76D-CDAB-44CB-A08C-A49FDBA4659D}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@@ -21,8 +27,23 @@ Global
|
||||
{91954D82-A5FC-417B-8FD9-D9C165C8F16C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{91954D82-A5FC-417B-8FD9-D9C165C8F16C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{91954D82-A5FC-417B-8FD9-D9C165C8F16C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{1D45BDC4-74C4-4356-8B93-7F7A09106BB8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{1D45BDC4-74C4-4356-8B93-7F7A09106BB8}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{1D45BDC4-74C4-4356-8B93-7F7A09106BB8}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{1D45BDC4-74C4-4356-8B93-7F7A09106BB8}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{149E6872-CE95-493B-B136-535E64C65A49}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{149E6872-CE95-493B-B136-535E64C65A49}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{149E6872-CE95-493B-B136-535E64C65A49}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{149E6872-CE95-493B-B136-535E64C65A49}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{85EEA76D-CDAB-44CB-A08C-A49FDBA4659D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{85EEA76D-CDAB-44CB-A08C-A49FDBA4659D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{85EEA76D-CDAB-44CB-A08C-A49FDBA4659D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{85EEA76D-CDAB-44CB-A08C-A49FDBA4659D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {B57FDA8F-95CF-478B-A0A8-7FF0F01CCFAB}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
||||
@@ -34,10 +34,11 @@ namespace Masuit.Tools.Models
|
||||
/// 收件人,多个收件人用英文逗号隔开
|
||||
/// </summary>
|
||||
public string Tos { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否启用SSL
|
||||
/// 是否启用SSL,默认已启用
|
||||
/// </summary>
|
||||
public bool EnableSsl { get; set; }
|
||||
public bool EnableSsl { get; set; } = true;
|
||||
/// <summary>
|
||||
/// 邮件消息对象
|
||||
/// </summary>
|
||||
@@ -65,11 +66,11 @@ namespace Masuit.Tools.Models
|
||||
SmtpClient GetSmtpClient => new SmtpClient
|
||||
{
|
||||
UseDefaultCredentials = false,
|
||||
Credentials = new System.Net.NetworkCredential(Username, Password),
|
||||
DeliveryMethod = SmtpDeliveryMethod.Network,
|
||||
EnableSsl = EnableSsl,
|
||||
Host = SmtpServer,
|
||||
Port = SmtpPort,
|
||||
EnableSsl = EnableSsl,
|
||||
Credentials = new System.Net.NetworkCredential(Username, Password),
|
||||
DeliveryMethod = SmtpDeliveryMethod.Network,
|
||||
};
|
||||
|
||||
//回调方法
|
||||
@@ -89,7 +90,7 @@ namespace Masuit.Tools.Models
|
||||
if (smtpClient == null || mailMessage == null) return;
|
||||
Subject = Subject;
|
||||
Body = Body;
|
||||
EnableSsl = false;
|
||||
//EnableSsl = false;
|
||||
//发送邮件回调方法
|
||||
actionSendCompletedCallback = completedCallback;
|
||||
smtpClient.SendCompleted += SendCompletedCallback;
|
||||
@@ -110,8 +111,7 @@ namespace Masuit.Tools.Models
|
||||
if (smtpClient == null || mailMessage == null) return;
|
||||
Subject = Subject;
|
||||
Body = Body;
|
||||
EnableSsl = false;
|
||||
//发送邮件回调方法
|
||||
//EnableSsl = false;
|
||||
smtpClient.Send(mailMessage); //异步发送邮件,如果回调方法中参数不为"true"则表示发送失败
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user