Results 1 to 2 of 2

Thread: Email address formatter

  1. #1

    Thread Starter
    Hyperactive Member compuGEEK's Avatar
    Join Date
    May 1999
    Location
    Mpls,MN,USA
    Posts
    281

    Post

    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

  2. #2
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,177

    Post

    Something like:
    Code:
        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
    [email protected]
    [email protected]


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width