Testing SMTP server is running via C#

Viewed 38914

How can I test SMTP is up and running via C# without sending a message.

I could of course try:

try{
// send email to "nonsense@example.com"
}
catch
{
// log "smtp is down"
}

There must be a more tidy way to do this.

5 Answers
Related