Skip to content

yangzhongke/YouZack.ErrorMail

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YouZack.ErrorMail

Mail Logging provider on .Net Core, which can be configured as 'send the same error only once', if SendSameErrorOnlyOnce=true, if there are more than one same messages ocurred, only one mail would be sent in the time of "IntervalSeconds" senconds.

Install-Package YouZack.ErrorMail
services.AddLogging(builder => {
	builder.AddErrorMail(opt => {
		opt.From = "server@xxx.com";
		opt.To = new []{"yzk@xxx.com" };
		opt.IntervalSeconds = 30;
		opt.SendSameErrorOnlyOnce = true;
		opt.SmtpEnableSsl = true;
		opt.SmtpUserName = "server@xxxx.com";
		opt.SmtpPassword = "2323423fasfadsaf";
		opt.SmtpServer = "smtp.xxx.com";
		opt.SmtpEnableSsl = true;
	});
});

About

Mail Logging provider on .Net Core, which can be configured as 'send the same error only once'

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages