I want to check whether an SMTP mailbox is available for a given username and password. I am using the SmtpClient.Send
method to send the email, but before sending it I want to check the whether the credentials provided are correct and also to check whether the SMTP server is valid.
How can I do this from C#?