Ana içeriğe geç
Version: 1.0.1

Mail Sender

It sends email via SMTP. You can create an object from the MilvaMailSender class. In order to benefit from mail send operation with dependency injection, you must register the IMilvaMailSender type in the service collection.

Usage

To register this class to service collection;


string sender = "[email protected]";

services.AddSingleton<IMilvaMailSender>(new MilvaMailSender(sender ,
new NetworkCredential(sender, "yourpassword"),
SmtpPort,
"smtphost"));


await _milvaMailSender.MilvaSendMailAsync("[email protected]", "MailSubject", "MailBody", isBodyHtml : false);

You can also send files. For more