Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sending a Email using smtp server in .Net Core? [closed]

I would like to send email using SMTP server through .net Core.
Please explain

like image 529
Saurabh Nachankar Avatar asked Jan 11 '17 06:01

Saurabh Nachankar


People also ask

How do I close SMTP connection?

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.

Is SmtpClient obsolete?

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 .


1 Answers

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!

like image 121
MindingData Avatar answered Sep 30 '22 16:09

MindingData