This is a very simple mail component test that checks for a few common mail components on your server.
Code:
<%
Sub errorCheck(errObj)
if errObj <> 0 then
response.write "This component is not available on this server.<br>"
err.clear
else
response.write "This component is available on this server.<br>"
end if
response.write "</p>"
End Sub
Dim obTest
On Error Resume Next
Set obTest = Server.CreateObject("CDONTS.NEWMAIL")
Response.write "<P><strong>Testing CDONTS mail component...</strong><br>"
errorCheck(err)
Set obTest = Server.CreateObject("JMAIL.SMTPMAIL")
Response.write "<P><strong>Testing JMail component...</strong><br>"
errorCheck(err)
Set obTest = Server.CreateObject("Persits.MailSender")
Response.write "<P><strong>Testing ASPEmail component...</strong><br>"
errorCheck(err)
Set obTest = Server.CreateObject("CDO.MESSAGE")
Response.write "<P><strong>Testing CDO mail component...</strong><br>"
errorCheck(err)
Set obTest = Nothing
%>
Save this script in a new page and, of course, save it with .
asp extension. Simply run it and it will tell which, if any, mail components are installed.
It's simple to add new mail components to this, also.