Hunny Software Library Reference

SmtpClient.Disconnect Method 

Closes the connection to the SMTP server.

[Visual Basic]
Public Sub Disconnect()
[C#]
public void Disconnect();

Remarks

This method closes the connection to the SMTP server.

The correct way to end an SMTP session is to send a QUIT command, which causes the server to perform any necessary closing operations and close the connection. Therefore you should almost always call Quit immediately before you call Disconnect.

You may safely call this method even if the client is not connected.

See Also

SmtpClient Class | Hunny.Mail Namespace | SmtpClient.Quit method