Using var client=new SmtpClient ();
Try
{
Client. The Connect (" smtp.qq.com ", 587, false);
Client. Authenticate (" [email protected] ", "XXXXXXX");
Client. The Send (message);
}
Catch
{
Client. Disconnect (true);
return -1;
}
If target email address wrong, will also be normal to send, is not an exception occurs, please email successfully sent to how to accurately judge the other side of the mailbox,