PDA

Click to See Complete Forum and Search --> : Testing for email service/accounts on local machine


matnace
Feb 27th, 2003, 10:41 AM
Hello all,

I need to test to make sure a user, or the local machine, can send an email. I'm using the System.Web.Mail.Smtp namespace to send the email. I haven't found any properties or methods to test for email service. Anybody got any idea on how to solve this without using a Try Catch block.

Matt

Redth
Feb 27th, 2003, 03:17 PM
could use windows sockets to connect to the local machine on the smtp port... then the machine should refuse the connection or give some sort of error if it doesn't have a smtp server running...


personally i'd just pick a mail server somewhere and code the program so it always sends with that server... that way the machine only needs a internet connection to send email..

though some mailservers might not like you bouncing emails off of them...