SendEmail_Ltnm 3.0.0

dotnet add package SendEmail_Ltnm --version 3.0.0
                    
NuGet\Install-Package SendEmail_Ltnm -Version 3.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="SendEmail_Ltnm" Version="3.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SendEmail_Ltnm" Version="3.0.0" />
                    
Directory.Packages.props
<PackageReference Include="SendEmail_Ltnm" />
                    
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 SendEmail_Ltnm --version 3.0.0
                    
#r "nuget: SendEmail_Ltnm, 3.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 SendEmail_Ltnm@3.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=SendEmail_Ltnm&version=3.0.0
                    
Install as a Cake Addin
#tool nuget:?package=SendEmail_Ltnm&version=3.0.0
                    
Install as a Cake Tool

support config Environment Variable: ENV EMAIL_HOST (string) ENV EMAIL_PORT (int) ENV EMAIL_ENABLESSL (bool) ENV EMAIL_DEFAULTCREDENTIALS (bool) ENV EMAIL_USERNAME (string) ENV EMAIL_PASSWORD (string) ENV EMAIL_BODYISHTML (bool)

Send Mail Sample Support Only dotnet Core Config Step By Step. Step one: Add config to file "appsettings.json": "Email": { "Smtp": { "Host": "host_mail", "Port": 25, "Username": "user_mail", "Password": "password_user_mail", "DefaultCredentials": false }, "EnableSsl": false, "BodyIsHtml": true },

Step two add middleware to ConfigureServices: services.Configure<EmailSetting>(Configuration.GetSection("Email")); services.AddScoped<IEmailService, EmailService>();

Step three add services and use:

Method: SendEmail(string template, string layout, string subject, Dictionary<string, string> mergedFields, List<string> toReceipients, List<string> bccToReceipients = null, List<string> ccToReceipients = null, Dictionary<string, byte[]> attachments = null, string displayName = null)

NOTE: parameter "layout" required has text "[[Content]]", "mergedFields" is list key and value mapping to template has text "[[key]]" and "[[key]]" will replace equal value

Example:

public class HomeController : Controller { private IEmailService _mailSvc;

public HomeController(IEmailService mailSvc) { _mailSvc = mailSvc; }

[HttpGet("sendmail")] public IActionResult Senmail() { Dictionary<string, string> fiels = new Dictionary<string, string>(); fiels.Add("item", "luantran"); return Ok(_mailSvc.SendMail("ACB [[item]]", "Layout SendMail [[Content]] end layout", "Test Send mail" , fiels, new List<string> { "abc@acb.vn" })); } }

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.0 is compatible.  netcoreapp3.1 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETCoreApp 3.0

    • No dependencies.

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
3.0.0 895 10/16/2019
1.0.6 972 5/29/2019
1.0.5 824 5/24/2019
1.0.4 1,275 4/12/2019
1.0.3 813 4/12/2019
1.0.2 808 4/12/2019