Source: Send SMTP Mail Message
Message: The SMTP server has unexpectedly disconnected.
Exception Type: MailKit.Net.Smtp.SmtpProtocolException
Source: Send SMTP Mail Message
Message: The SMTP server has unexpectedly disconnected.
Exception Type: MailKit.Net.Smtp.SmtpProtocolException
Was the activity working before and suddenly stopped working?
Try to ping the SMTP mail server from command prompt and check if the ping is successful.
If the ping is successful check if the port is blocked or not using telnet.
Eg :
ping smtp.gmail.com
telnet smtp.gmail.com 465