Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. How to check if an email address exists without sending an email?

How to check if an email address exists without sending an email?

Scheduled Pinned Locked Moved ASP.NET
tutorialquestion
8 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    ansriharsha
    wrote on last edited by
    #1

    Hi all, How to check if an email address exists without sending an email without using a third party control. Thanks and Regards, sriharsha

    M J S 3 Replies Last reply
    0
    • A ansriharsha

      Hi all, How to check if an email address exists without sending an email without using a third party control. Thanks and Regards, sriharsha

      M Offline
      M Offline
      Michel Godfroid
      wrote on last edited by
      #2

      You can't. Note that sending an email offers no guarantee either. I use a black hole setup on all my mail servers, and I never reject a mail. I just throw them away.

      1 Reply Last reply
      0
      • A ansriharsha

        Hi all, How to check if an email address exists without sending an email without using a third party control. Thanks and Regards, sriharsha

        J Offline
        J Offline
        JHizzle
        wrote on last edited by
        #3

        Not possible really, the best you can do is use regular expression to validate that the format of the address provided is valid.

        A 1 Reply Last reply
        0
        • J JHizzle

          Not possible really, the best you can do is use regular expression to validate that the format of the address provided is valid.

          A Offline
          A Offline
          ansriharsha
          wrote on last edited by
          #4

          regular expression will only validate the email address format,which we are using, but we want to validate the email address exixtence or atleast domain existence. i.e to chekh if the user has mentioned a valid email id or not, and then send a email based on that. thanks and Regards, sriharsha

          J 1 Reply Last reply
          0
          • A ansriharsha

            regular expression will only validate the email address format,which we are using, but we want to validate the email address exixtence or atleast domain existence. i.e to chekh if the user has mentioned a valid email id or not, and then send a email based on that. thanks and Regards, sriharsha

            J Offline
            J Offline
            JHizzle
            wrote on last edited by
            #5

            ansriharsha wrote:

            regular expression will only validate the email address format,which we are using,

            Right, which is what I said. I don't think you're going to be able to do this without sending a test email int eh first place which defeats the purpose of the exercise. Your other option is to strip the domain out, do a webrequest to it on the assumption that they have a website set up on it. If so, better chance that the email address is valid, if not, it's a dud.

            T 1 Reply Last reply
            0
            • J JHizzle

              ansriharsha wrote:

              regular expression will only validate the email address format,which we are using,

              Right, which is what I said. I don't think you're going to be able to do this without sending a test email int eh first place which defeats the purpose of the exercise. Your other option is to strip the domain out, do a webrequest to it on the assumption that they have a website set up on it. If so, better chance that the email address is valid, if not, it's a dud.

              T Offline
              T Offline
              The Man from U N C L E
              wrote on last edited by
              #6

              Well that lets bogus hotmail addresses though for starters. And I work at an office where we have a .co.uk email address but a .com web site (historical nightmare, don't ask).

              If you have knowledge, let others light their candles at it. Margaret Fuller (1810 - 1850) [My Articles]  [My Website]

              J 1 Reply Last reply
              0
              • T The Man from U N C L E

                Well that lets bogus hotmail addresses though for starters. And I work at an office where we have a .co.uk email address but a .com web site (historical nightmare, don't ask).

                If you have knowledge, let others light their candles at it. Margaret Fuller (1810 - 1850) [My Articles]  [My Website]

                J Offline
                J Offline
                JHizzle
                wrote on last edited by
                #7

                Sadly so, hence the disclaimer "better chance" :)

                1 Reply Last reply
                0
                • A ansriharsha

                  Hi all, How to check if an email address exists without sending an email without using a third party control. Thanks and Regards, sriharsha

                  S Offline
                  S Offline
                  suwangsoft
                  wrote on last edited by
                  #8

                  public static bool IsEmail(string Str) { bool v = false; if (Str != null && Str.Trim() != "") { Match m = Regex.Match(Str, @"\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"); if (m.Success) { if (Str == m.Value) { v = true; } } } return v; }

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups