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. C / C++ / MFC
  3. Valid e-mail address

Valid e-mail address

Scheduled Pinned Locked Moved C / C++ / MFC
9 Posts 6 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.
  • O Offline
    O Offline
    Ola Carlsson
    wrote on last edited by
    #1

    Hi, Does anyone now a function/class to check if an e-mail address is valid? /Ola Carlsson

    C R 3 Replies Last reply
    0
    • O Ola Carlsson

      Hi, Does anyone now a function/class to check if an e-mail address is valid? /Ola Carlsson

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Apart from parsing it for form, I don't think that is remotely possible. If I give you cgraus@mydomain.com, how can you tell that mydomain.com knows what to do with this address, except by sending an email to it and seeing if it bounces back ? Christian The tragedy of cyberspace - that so much can travel so far, and yet mean so little. "I'm somewhat suspicious of STL though. My (test,experimental) program worked first time. Whats that all about??!?! - Jon Hulatt, 22/3/2002

      C 1 Reply Last reply
      0
      • C Christian Graus

        Apart from parsing it for form, I don't think that is remotely possible. If I give you cgraus@mydomain.com, how can you tell that mydomain.com knows what to do with this address, except by sending an email to it and seeing if it bounces back ? Christian The tragedy of cyberspace - that so much can travel so far, and yet mean so little. "I'm somewhat suspicious of STL though. My (test,experimental) program worked first time. Whats that all about??!?! - Jon Hulatt, 22/3/2002

        C Offline
        C Offline
        ColinDavies
        wrote on last edited by
        #3

        Christian Graus wrote: except by sending an email to it and seeing if it bounces back ? My domain has a catch all, so nothing bounces back, just forwards valid stuff and deletes junk after a while. Regardz Colin J Davies

        Sonork ID 100.9197:Colin

        I think it's interesting that we often qu-ote each other in our sigs and attribute the qu-otes to "The Lounge". --- Daniel Fergusson, "The Lounge"

        1 Reply Last reply
        0
        • O Ola Carlsson

          Hi, Does anyone now a function/class to check if an e-mail address is valid? /Ola Carlsson

          R Offline
          R Offline
          Ravi Bhavnani
          wrote on last edited by
          #4

          Check the return status from the POP3 protocol's USER command. A "+OK" should be returned for valid usernames. This should work even for forwarding POP mailboxes. /ravi "There is always one more bug..." http://www.ravib.com ravib@ravib.com

          C 1 Reply Last reply
          0
          • O Ola Carlsson

            Hi, Does anyone now a function/class to check if an e-mail address is valid? /Ola Carlsson

            R Offline
            R Offline
            Ravi Bhavnani
            wrote on last edited by
            #5

            Not all POP servers will let you connect from outside their domain! In the US, ATTBI (previously MediaOne) is notorious for no longer allowing you to check your mail remotely thru a POP email client, unless you're logged into ATTBI. However, they do offer a crappy web interface into their email system, so you can get/send email from any browser. /ravi "There is always one more bug..." http://www.ravib.com ravib@ravib.com

            A 1 Reply Last reply
            0
            • R Ravi Bhavnani

              Check the return status from the POP3 protocol's USER command. A "+OK" should be returned for valid usernames. This should work even for forwarding POP mailboxes. /ravi "There is always one more bug..." http://www.ravib.com ravib@ravib.com

              C Offline
              C Offline
              Christian Graus
              wrote on last edited by
              #6

              Does this mean it would be trivial to write a spam filter, simply by checking all incoming mail for a valid return address ? Christian The tragedy of cyberspace - that so much can travel so far, and yet mean so little. "I'm somewhat suspicious of STL though. My (test,experimental) program worked first time. Whats that all about??!?! - Jon Hulatt, 22/3/2002

              R J 2 Replies Last reply
              0
              • C Christian Graus

                Does this mean it would be trivial to write a spam filter, simply by checking all incoming mail for a valid return address ? Christian The tragedy of cyberspace - that so much can travel so far, and yet mean so little. "I'm somewhat suspicious of STL though. My (test,experimental) program worked first time. Whats that all about??!?! - Jon Hulatt, 22/3/2002

                R Offline
                R Offline
                Ravi Bhavnani
                wrote on last edited by
                #7

                It's pretty easy to write, but I doubt it would be efficient, since you'd have to try to establish a connection to the POP server for each unique domain. Also, it could easily give you bogus results - for example if you received mail from a valid address user@attbi.com, the checker would return "false" since you won't be able to connect to attbi.com's POP server from outside their domain. Further, if your domain's POP server had a catch-all account, any username at that domain could be flagged as being valid. Imho, there's no foolproof way to verify the validity of an email address. /ravi "There is always one more bug..." http://www.ravib.com ravib@ravib.com

                1 Reply Last reply
                0
                • R Ravi Bhavnani

                  Not all POP servers will let you connect from outside their domain! In the US, ATTBI (previously MediaOne) is notorious for no longer allowing you to check your mail remotely thru a POP email client, unless you're logged into ATTBI. However, they do offer a crappy web interface into their email system, so you can get/send email from any browser. /ravi "There is always one more bug..." http://www.ravib.com ravib@ravib.com

                  A Offline
                  A Offline
                  Alexandru Savescu
                  wrote on last edited by
                  #8

                  Neither will Yahoo! starting with the 24th this month :( Best regards, Alexandru Savescu

                  1 Reply Last reply
                  0
                  • C Christian Graus

                    Does this mean it would be trivial to write a spam filter, simply by checking all incoming mail for a valid return address ? Christian The tragedy of cyberspace - that so much can travel so far, and yet mean so little. "I'm somewhat suspicious of STL though. My (test,experimental) program worked first time. Whats that all about??!?! - Jon Hulatt, 22/3/2002

                    J Offline
                    J Offline
                    Jon Hulatt
                    wrote on last edited by
                    #9

                    It's actually totally unworkable. You have no way of knowing what a remote domains POP server is. MX records only point to SMTP mail exchangers, and often these have nothing to do with pop. Also, very often POP servers are behind firewalls. Sorry to dissapoint you all with my lack of a witty or poignant signature.

                    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