dim osmtptest set osmtptest = new ValidSMTP wscript.echo ("ValidSMTP 1:" & osmtptest.test("ValidSMTP@carius.de")) wscript.echo ("ValidSMTP 0:" & osmtptest.test("ValidSMTP.@carius.de")) msgbox ("Fertig") wscript.quit(0) Class ValidSMTP ' Generic Class to validate an given SMTP-Address against formal rules (not a real NSLookup etc.) '~ Version 1.0 dim SMTPRegEx private Sub Class_Initialize Set SMTPregEx = New RegExp ' von http://www.twilightsoul.com/Default.aspx?PageContentID=10&tabid=134 SMTPregEx.Pattern = "([\t\x20]*[!#-'\*\+\-/-9=\?A-Z\^-~]+"_ &"(\.[!#-'\*\+\-/-9=\?A-Z\^-~]+)*|""[\x01-\x09\x0B\x0C"_ &"\x0E-\x21\x23-\x5B\x5D-\x7F]*"")@(([a-zA-Z0-9][-a-zA-Z0-9]*"_ &"[a-zA-Z0-9]\.)+[a-zA-Z]{2,}|\[(([0-9]?[0-9]|1[0-9][0-9]|"_ &"2[0-4][0-9]|25[0-5])\.){3}([0-9]?[0-9]|1[0-9][0-9]|"_ &"2[0-4][0-9]|25[0-5])\])" SMTPregEx.IgnoreCase = true End Sub private Sub Class_Terminate() : Set SMTPregEx = nothing : End Sub function Test(wert) test = SMTPregEx.test(wert) ' Test is true if Match is found end function end class