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.
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.
// Install SendEmail_Ltnm as a Cake Addin
#addin nuget:?package=SendEmail_Ltnm&version=3.0.0

// Install SendEmail_Ltnm as a Cake Tool
#tool nuget:?package=SendEmail_Ltnm&version=3.0.0                

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. 
.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 577 10/16/2019
1.0.6 685 5/29/2019
1.0.5 532 5/24/2019
1.0.4 987 4/12/2019
1.0.3 525 4/12/2019
1.0.2 522 4/12/2019