Home > Net >  Consult: MimeKit send mail, how do you know to send a success?
Consult: MimeKit send mail, how do you know to send a success?

Time:03-21

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,
  •  Tags:  
  • C#
  • Related