Home > Enterprise >  CS0246 The type or namespace name 'MailKit' could not be found (are you missing a using di
CS0246 The type or namespace name 'MailKit' could not be found (are you missing a using di

Time:01-11

I'm stuck with basic Mailkit implementation in ASP.NET Core, my error:

CS0246 The type or namespace name 'MailKit' could not be found (are you missing a using directive or an assembly reference?

using (var client = new MailKit.Net.Smtp.SmtpClient()) { ... }

CodePudding user response:

You need to install NETCore.MailKit:

dotnet add package NETCore.MailKit --version 2.1.0
  • Related