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. General Programming
  3. C#
  4. How can I check if a mail exists or not?

How can I check if a mail exists or not?

Scheduled Pinned Locked Moved C#
questioncsharpasp-nethelp
4 Posts 4 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.
  • M Offline
    M Offline
    m rastgar
    wrote on last edited by
    #1

    I should check if user’s mail exists or not, when she/he enters in my web application. But in asp.net we can just send an email with classes in the System.web.mail namespace. But as I mentioned, it is vital in my web application that user’s mail is a real mail. So I should check it if it is real or not (except its format). Please instruct me to solve my problem with mail checking. Thanks a lot. Thanks Rastegar

    G T I 3 Replies Last reply
    0
    • M m rastgar

      I should check if user’s mail exists or not, when she/he enters in my web application. But in asp.net we can just send an email with classes in the System.web.mail namespace. But as I mentioned, it is vital in my web application that user’s mail is a real mail. So I should check it if it is real or not (except its format). Please instruct me to solve my problem with mail checking. Thanks a lot. Thanks Rastegar

      G Offline
      G Offline
      Guffa
      wrote on last edited by
      #2

      There is no way that you can automatically check for certain if the mail address exists. You can ask the mail server if it will accept the mail address, but that is not a guarantee that the address is correct. Large mail servers (for an example hotmail) will accept any address, as it's too much work to check the address both before and after recieving a mail. The only way that you can be certain that the address works is if you send a mail to the user, that contains an address where they can confirm the address. --- b { font-weight: normal; }

      1 Reply Last reply
      0
      • M m rastgar

        I should check if user’s mail exists or not, when she/he enters in my web application. But in asp.net we can just send an email with classes in the System.web.mail namespace. But as I mentioned, it is vital in my web application that user’s mail is a real mail. So I should check it if it is real or not (except its format). Please instruct me to solve my problem with mail checking. Thanks a lot. Thanks Rastegar

        T Offline
        T Offline
        tarasn
        wrote on last edited by
        #3

        Check out MailChecker [^]. MailChecker is a DLL that lets you check the validity of an Email address by querying the mail server responsible for the email address and asking it via SMTP if the email is valid. DevIntelligence.com - My blog for .Net Developers

        1 Reply Last reply
        0
        • M m rastgar

          I should check if user’s mail exists or not, when she/he enters in my web application. But in asp.net we can just send an email with classes in the System.web.mail namespace. But as I mentioned, it is vital in my web application that user’s mail is a real mail. So I should check it if it is real or not (except its format). Please instruct me to solve my problem with mail checking. Thanks a lot. Thanks Rastegar

          I Offline
          I Offline
          Ista
          wrote on last edited by
          #4

          Well retrieveing mail is done on a POP3 server. You must execute commands on this server, just like you would SMTP. This is the API to do such functions http://msdn.microsoft.com/library/default.asp?url=/library/en-us/exchanchor/htms/msexchsvr_mapi.asp[^] 1 line of code equals many bugs. So don't write any!!

          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