How to verify mail server is up or not
Hi there,
I have web page with a form. When a user hits the submit button the form content stored in variable emailbody is emailed. I was wondering if there is any way to catch the exception when the mail server is down or not reachable. I did the following but ColdFusion is not throwing any exceptions even though I know for sure the mail server is down.
Any clues?
Thanks
Joe
<cftry>
<cfmail
from="me@something.com"
to="you@something.com"
subject="Test Email"
type="html"
server="mail.test.com">
#emailbody#
</cfmail>
<cfcatch type="any">
<cfoutput>Due to #cfcatch.Detail# we are unable to email your comment.</cfoutput>
</cfcatch>
</cftry>
