SendEmail_Ltnm 1.0.3

There is a newer version of this package available.
See the version list below for details.
dotnet add package SendEmail_Ltnm --version 1.0.3                
NuGet\Install-Package SendEmail_Ltnm -Version 1.0.3                
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="1.0.3" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SendEmail_Ltnm --version 1.0.3                
#r "nuget: SendEmail_Ltnm, 1.0.3"                
#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=1.0.3

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

1.0.3 Fix bug attachment

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, int? createdId = null, List<int> receiverIds = 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 netcoreapp2.2 is compatible.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETCoreApp 2.2

    • 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 579 10/16/2019
1.0.6 688 5/29/2019
1.0.5 532 5/24/2019
1.0.4 988 4/12/2019
1.0.3 526 4/12/2019
1.0.2 523 4/12/2019