Skip to content

onlyargon/EmailSender

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Usage

Install the nuget

Install-Package Argon.Util.EmailSender -Version 1.0.3

Add below object to the appsettings.json

"EmailConfiguration":  {
 "From":  "YOUR_EMAIL",
 "SmtpServer":  "smtp.gmail.com",
 "Port":  465,
 "UserName":  "YOUR_EMAIL",
 "Password":  "YOUR_APP_PASSWORD"
 }

Add below code section to the startup.cs

using EmailSender;

And to below code block to the ConfigureServices method

var emailConfig = Configuration
                  .GetSection("EmailConfiguration")
                  .Get<EmailConfiguration>();
                  
services.AddSingleton(emailConfig);
services.AddScoped<IEmailSender,EmailSender>();

About

Email sender for .net core

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages