Validate an Email Address

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John Wright

    Validate an Email Address

    I want to validate an email address against our Exchange server. Anyone
    have code or point me in the right direction?


    John


  • sloan

    #2
    Re: Validate an Email Address

    Maybe this will get you started?


    I'm assuming you mean more than just "is this a valid email address?"



    "John Wright" <riley_wright@h otmail.comwrote in message
    news:OG5g26pDJH A.4768@TK2MSFTN GP06.phx.gbl...
    >I want to validate an email address against our Exchange server. Anyone
    >have code or point me in the right direction?
    >
    >
    John
    >

    Comment

    • sloan

      #3
      Re: Validate an Email Address

      Maybe this will get you started?


      I'm assuming you mean more than just "is this a valid email address?"



      "John Wright" <riley_wright@h otmail.comwrote in message
      news:OG5g26pDJH A.4768@TK2MSFTN GP06.phx.gbl...
      >I want to validate an email address against our Exchange server. Anyone
      >have code or point me in the right direction?
      >
      >
      John
      >

      Comment

      • kimiraikkonen

        #4
        Re: Validate an Email Address

        On Sep 4, 5:58 pm, "John Wright" <riley_wri...@h otmail.comwrote :
        I want to validate an email address against our Exchange server. Anyone
        have code or point me in the right direction?
        >
        John
        If you're not meaning domain validation, but format validation of mail
        address, you can use Regex pattern to check if it's a valid e-mail
        address:

        '-----Begin-------
        Imports System.Text.Reg ularExpressions

        Dim pattern As String
        ' I hope pattern is proper
        pattern = "\w+([-+.]\w)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
        If Regex.IsMatch(" mail_here", pattern) = True Then
        MsgBox("Valid mail address!")
        Else
        MsgBox("Invalid mail address!")
        End If
        '-----End-------


        Hope this helps,

        Onur Güzel

        Comment

        Working...