I would like to send email using SMTP server through .net Core.
Please explain
QUIT. The QUIT command send the request to terminate the SMTP session. Once the server responses with 221 , the client closes the SMTP connection. This command specifies that the receiver MUST send a “ 221 OK ” reply and then closes the transmission channel.
The SmtpClient class is obsolete in Xamarin. However: It is included in the . NET Standard 2.0 and later versions and therefore must be part of any .
Through the .net core framework, you can't as it stands right now.
At the time of writing .net core version 1.1 implements the .net standard of 1.6. At that point in time, System.Net.Mail had not been ported. But as you can see by this pull request : https://github.com/dotnet/corefx/pull/12416 . It looks it's going to make it into .net Standard 2.0 (Which will likely then be implemented in the next version of .net core).
In the meantime, it seems like everyone is using the library MailKit (https://github.com/jstedfast/MailKit) which works pretty well!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With