![]() ![]() I'm currently attempting to travel around Australia by motorcycle with my wife Tina on a pair of Royal Enfield Himalayans. Subscribe to my YouTube channel or follow me on Twitter, Facebook or GitHub to be notified when I post new content. ![]() Smtp.Authenticate(_appSettings.SmtpUser, _appSettings.SmtpPass) Smtp.Connect(_appSettings.SmtpHost, _appSettings.SmtpPort, SecureSocketOptions.StartTls) create email messageĮ(MailboxAddress.Parse(" ")) Įmail.To.Add(MailboxAddress.Parse(" ")) Įmail.Body = new TextPart(TextFormat.Html) See instructions below for using different SMTP providers such as Gmail and Hotmail. This code sends a simple HTML email using the Ethereal free SMTP testing service, you can create a free test account in one click at and copy the username and password from below the title SMTP configuration. Visual Studio Package Manager Console: Install-Package MailKit NET Core CLI: dotnet add package MailKit This is a quick example of how to send an email in ASP.NET Core 3.1 using the MailKit email client library.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |