Simplify.Mail
2.0.0
dotnet add package Simplify.Mail --version 2.0.0
NuGet\Install-Package Simplify.Mail -Version 2.0.0
<PackageReference Include="Simplify.Mail" Version="2.0.0" />
<PackageVersion Include="Simplify.Mail" Version="2.0.0" />
<PackageReference Include="Simplify.Mail" />
paket add Simplify.Mail --version 2.0.0
#r "nuget: Simplify.Mail, 2.0.0"
#:package Simplify.Mail@2.0.0
#addin nuget:?package=Simplify.Mail&version=2.0.0
#tool nuget:?package=Simplify.Mail&version=2.0.0
Simplify.Mail Documentation
Provides IMailSender interface and MailSender implementation for simple e-mail sending.
Available at NuGet as binary package
Quick Start Usage
{
"MailSenderSettings": {
"SmtpServerAddress": "server name or ip address",
"SmtpUserName": "user name",
"SmtpUserPassword": "user password"
}
}
Simple mail sending example
var config = new ConfigurationBuilder()
.AddJsonFile("appsettings.json")
.Build();
new MailSender(config).Send("mymail@somedomain.com", "mailrecepient@somedomain.com", "Mail subject!", "Mail message, can be full HTML page");
Anti-Spam filter
Mail sender includes anti-spam message pool, which is ON by default and default pool message life time is 120 min.
Whenever message is sending via MailSender, it's body will be added to anti-spam pool. At the next time, when another message with the same body is sent in next 120 minutes after first message is sent then the message will not be sent. It is useful, for example, if you have some windows service, which is doing some processing every minute and so on, and it is started to throwing same exceptions every minute, then the MailSender will prevent it from spamming.
Anti-spam pool can be turned off via configuration.
You can specify body for anti-spam pool checking separately from mail message body. For example, if you have some "current time" information in your body, which will be changing every time message sends, and anyway your want to use anti-spam pool, then you can provide that message body without time information as separated parameter, for example:
var message = "Some problem was happened at: ";
mailSender.Send("mymail@somedomain.com", "mailrecepient@somedomain.com", "Some problem was happened at: ", message + DateTime.Now, message);
Multiple recepients, carbon copy recipients and attachements
mailSender.Send("mymail@somedomain.com", new List<string> { "address1@somedomain.com", "address2@somedomain.com" }, new List<string> { "address3@somedomain.com", "address4@somedomain.com" },
"Mail subject!", "Mail message, can be full HTML page", null,
new Attachment(ms, "Attachement title.xls", "application/vnd.ms-excel"));
Send message to recipients separately
mailSender.SendSeparately("mymail@somedomain.com", new List<string> { "address1@somedomain.com", "address2@somedomain.com" }, "Mail subject!", "Mail message, can be full HTML page");
All available options example
{
"MailSenderSettings": {
"SmtpServerAddress": "server name or ip address",
"SmtpUserName": "user name",
"SmtpUserPassword": "user password",
"SmtpServerPortNumber": "25",
"AntiSpamMessagesPoolOn": "true",
"AntiSpamPoolMessageLifeTime": "120",
"EnableSsl": "true"
}
}
| Product | Versions 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 is compatible. 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 | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 is compatible. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.8
- MailKit (>= 4.14.1)
- Microsoft.Extensions.Configuration (>= 9.0.11)
-
.NETStandard 2.0
- MailKit (>= 4.14.1)
- Microsoft.Extensions.Configuration (>= 9.0.11)
-
.NETStandard 2.1
- MailKit (>= 4.14.1)
- Microsoft.Extensions.Configuration (>= 9.0.11)
-
net9.0
- MailKit (>= 4.14.1)
- Microsoft.Extensions.Configuration (>= 9.0.11)
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 |
|---|---|---|
| 2.0.0 | 426 | 11/20/2025 |
| 2.0.0-pre01 | 302 | 11/17/2025 |
| 1.6.0 | 485 | 6/15/2025 |
| 1.5.5 | 1,345 | 8/26/2023 |
| 1.5.4 | 1,125 | 9/8/2022 |
| 1.5.3 | 641 | 7/21/2022 |
| 1.5.2 | 885 | 4/29/2022 |
| 1.5.1 | 1,173 | 2/2/2021 |
| 1.5.0 | 2,090 | 12/9/2019 |
| 1.4.0 | 1,756 | 12/12/2018 |
| 1.3.1 | 4,686 | 3/5/2018 |
| 1.3.0 | 8,169 | 6/1/2015 |
| 1.2.0 | 3,269 | 9/22/2014 |
| 1.1.0 | 2,066 | 9/2/2014 |
| 1.0.0 | 2,052 | 2/25/2014 |