PDA

Click to See Complete Forum and Search --> : Email address formatter


compuGEEK
Dec 28th, 1999, 04:38 AM
Hi

Can anyone think of a quick and dirty email address validater(for example, if the @ is missing or .com or whatever is missing at the end)?

I've written a quite lengthy routine to do it and am wondering if anyone has a shorter way to do it.

Thanks alot!



------------------
CompuGEEK

Aaron Young
Dec 30th, 1999, 12:06 AM
Something like:

Text1 = Trim(Text1)
If InStr(Text1, "@") = 0 Or InStr(Text1, ".") = 0 Or InStr("@.", Left$(Text1, 1)) > 0 Or InStr("@.", Right$(Text1, 1)) Then
MsgBox "Invalid Email"
End If

Aside from that you could strip out the Domain and Ping its Mail Server to verify the Domain is Valid.

------------------
Aaron Young
Analyst Programmer
aarony@redwingsoftware.com
ajyoung@pressenter.com