Question How to check SMTP connection without sending an email

adrian1906

Member
Joined
May 29, 2011
Messages
5
Programming Experience
10+
I have an application that processes photos and then emails the result.

Before it does any processing, I'd like the code to check if the provided SMTP server is configured correctly.

I can have the code to send a test email in a Try/Catch loop, but I'd like to avoid sending a test email out every time if the connection is valid.

I've seen suggestions that uses telnet and others that use 'Helo'. I'm looking for a VB.net solution

Thank you,
Adrian
 
One thought is to send a test email to a dummy email address. When I've seen this method suggested, its often associated with Spam. Would this technique eventually lead to my program losing its ability to send emails on the provided smtp server?

Adrian
 
Its unlikely unless the algorithms see a large volumes - one or two will not hurt. However you could however just bounce the email back to a dummy email set up in your company. That way you don't create spam.
 
Back
Top