'Keep in mind some DNS object may return something other than ""
If goodorbad = "" Then
Response.Redirect("badAddress.html")
Else
'continue form processing... EndIf
... always rule out hundreds of valid characters. Not the least being ' (apostrophe) and +(plus).
peter.o'toole+foo@bar.com is a perfectly valid address, these scripts aren't very nice on these people :-D
Let's try to stop spreading this notion that emails are simple letters and numebrs only. If we're going to write email validation scripts, let's at least try and make them accessible.
http://www.dsc-services.be
set MXValidate = Server.CreateObject("Company.Emailvalidate")
emailaddress = Request.Form("emailaddress")
MXValidate.serveraddresses = "XXX.XXX.XXX.XXX","XXX.XXX.XXX.XXX"
MXValidate.ValidateIt(emailaddress,resultcode)
If resultcode = False Then
Response.Redirect("badAddress.html")
Else
'continue form processing...
End If
http://www.dsc-services.be
Set DNSobject = Server.CreateObject("Company.DNS")
Emailaddress = Request.Form("emailaddress")
TheDomainName = Mid(emailaddress, _
InStr(1,emailaddress,"@",vbTextCompare)+1,Len(emailaddress))
DNSobject.domain = thedomainname
DNSobject.server = "XXX.XXX.XXX.XXX"
goodorbad = DNSojbect.dolookup
'Keep in mind some DNS object may return something other than ""
If goodorbad = "" Then
Response.Redirect("badAddress.html")
Else
'continue form processing...
End If
peter.o'toole+foo@bar.com is a perfectly valid address, these scripts aren't very nice on these people :-D
Let's try to stop spreading this notion that emails are simple letters and numebrs only. If we're going to write email validation scripts, let's at least try and make them accessible.