System.Configuration.ConfigurationErrorsException: 'Configuration system failed to initialize' ConfigurationErrorsException: Unrecognized configuration section system.net. (C:\Repos\Test_Email\XXXXXXX\bin\Debug\net5.0-windows\SpeadIMUI.dll.config line 3)
<?xml version="1.0" encoding="utf-8"?> <configuration> <system.net> <mailSettings> <smtp deliveryMethod="Network"> <network host="xxxx.xxxxxx.com" port="993" userName="xxx@xxxxxx.com" password="XXXXXXXXX" defaultCredentials="false" enableSsl="true" targetName="STARTTLS/mail.xxxxxxxx.com" /> </smtp> </mailSettings> </system.net> <connectionStrings> <add name="testing1" connectionString="Server=localhost;Port=3306;database=AAAA;user id=BBBB;password=XXXXX" /> </connectionStrings> </configuration>
SmtpClient
SmtpClient Class (System.Net.Mail) | Microsoft Docs[^] We don't recommend that you use the SmtpClient class for new development because SmtpClient doesn't support many modern protocols. Use MailKit[^] or other libraries instead. For more information, see SmtpClient shouldn't be used[^] on GitHub.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)