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. The Lounge
  3. email validation

email validation

Scheduled Pinned Locked Moved The Lounge
question
14 Posts 9 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.
  • J Juan Carlos Cobas

    Hi! I have a file with a huge number of email addresses. I'd like to validate them to make sure that each email is well-formed, the DNS actually exists and perhaps SMTP validation. I found several web pages that can be used to validate single email addresses, but do you know any web page/tool to use with massive emails? Thanks Carlos

    C Offline
    C Offline
    Chris Maunder
    wrote on last edited by
    #4

    The Dundas Mailer[^] is free and has a ValidateAddress method that will do the trick. cheers, Chris Maunder

    J T 2 Replies Last reply
    0
    • C Chris Maunder

      The Dundas Mailer[^] is free and has a ValidateAddress method that will do the trick. cheers, Chris Maunder

      J Offline
      J Offline
      Juan Carlos Cobas
      wrote on last edited by
      #5

      Thanks Chris, I'll give it a try :)

      1 Reply Last reply
      0
      • J Juan Carlos Cobas

        Hi! I have a file with a huge number of email addresses. I'd like to validate them to make sure that each email is well-formed, the DNS actually exists and perhaps SMTP validation. I found several web pages that can be used to validate single email addresses, but do you know any web page/tool to use with massive emails? Thanks Carlos

        P Offline
        P Offline
        Paul Watson
        wrote on last edited by
        #6

        Apologies if this is totally unhelpful: ^[\w-\.]{1,}\@([\da-zA-Z-]{1,}\.){1,}[\da-zA-Z-]{2,3}$ That is an email validation regular expression string. I have been using in a bulk emailer project and it works pretty well.

        Paul Watson
        Bluegrass
        Cape Town, South Africa

        Chris Losinger wrote: i hate needles so much i can't even imagine allowing one near The Little Programmer

        L 1 Reply Last reply
        0
        • P Paul Watson

          Apologies if this is totally unhelpful: ^[\w-\.]{1,}\@([\da-zA-Z-]{1,}\.){1,}[\da-zA-Z-]{2,3}$ That is an email validation regular expression string. I have been using in a bulk emailer project and it works pretty well.

          Paul Watson
          Bluegrass
          Cape Town, South Africa

          Chris Losinger wrote: i hate needles so much i can't even imagine allowing one near The Little Programmer

          L Offline
          L Offline
          Lunchy
          wrote on last edited by
          #7

          Mmmmm Regex's, mix that with a little perl, some Net::Ping and Net::SMTP, and you're all set, 30-50 lines later you're off to the races. *Drool* Sounds so fun, I almost feel like doin it even though I don't need it! :-D -Lunchy

          D 1 Reply Last reply
          0
          • J Juan Carlos Cobas

            :confused::confused:

            D Offline
            D Offline
            David Wulff
            wrote on last edited by
            #8

            I was just marvelling at how little effort people have to go to nowadays to build huge lists of valid emails. (not you, them)


            David Wulff

            "It is a helpless feeling to be unable to make something so terribly wrong... right."

            1 Reply Last reply
            0
            • C Chris Maunder

              The Dundas Mailer[^] is free and has a ValidateAddress method that will do the trick. cheers, Chris Maunder

              T Offline
              T Offline
              Tom Archer
              wrote on last edited by
              #9

              I'm getting COM exceptions trying to download the Mailer. Cheers, Tom Archer, Inside C# Mainstream is just a word for the way things always have been -- just a middle-of-the-road, tow-the-line thing; a front for the Man serving up the same warmed-over slop he did yesterday and expecting you to say, "Thank you sir, may I have another?"

              J 1 Reply Last reply
              0
              • L Lunchy

                Mmmmm Regex's, mix that with a little perl, some Net::Ping and Net::SMTP, and you're all set, 30-50 lines later you're off to the races. *Drool* Sounds so fun, I almost feel like doin it even though I don't need it! :-D -Lunchy

                D Offline
                D Offline
                David Stone
                wrote on last edited by
                #10

                Lunchy wrote: perl, some Net::Ping and Net::SMTP, :eek: Noo! Paul was suggesting a .NET RegularExpression! Weren't you Paul?... :~


                Hawaian shirts and shorts work too in Summer. People assume you're either a complete nut (in which case not a worthy target) or so damn good you don't need to worry about camouflage... -Anna-Jayne Metcalfe on Paintballing

                L 1 Reply Last reply
                0
                • D David Stone

                  Lunchy wrote: perl, some Net::Ping and Net::SMTP, :eek: Noo! Paul was suggesting a .NET RegularExpression! Weren't you Paul?... :~


                  Hawaian shirts and shorts work too in Summer. People assume you're either a complete nut (in which case not a worthy target) or so damn good you don't need to worry about camouflage... -Anna-Jayne Metcalfe on Paintballing

                  L Offline
                  L Offline
                  Lunchy
                  wrote on last edited by
                  #11

                  I know, but Perl is so FUN (and quick to write)! Everything else bores me. :( -Lunchy

                  1 Reply Last reply
                  0
                  • J Juan Carlos Cobas

                    Hi! I have a file with a huge number of email addresses. I'd like to validate them to make sure that each email is well-formed, the DNS actually exists and perhaps SMTP validation. I found several web pages that can be used to validate single email addresses, but do you know any web page/tool to use with massive emails? Thanks Carlos

                    J Offline
                    J Offline
                    Jan Vercauteren
                    wrote on last edited by
                    #12

                    just write something that reads mx records. (i wrote such a component last week during my study breaks. It's not super hard.) Then connect to the mailserver and try te send an email. it will reply if if the email exists or not. www.agilis.be

                    B 1 Reply Last reply
                    0
                    • J Jan Vercauteren

                      just write something that reads mx records. (i wrote such a component last week during my study breaks. It's not super hard.) Then connect to the mailserver and try te send an email. it will reply if if the email exists or not. www.agilis.be

                      B Offline
                      B Offline
                      basementman
                      wrote on last edited by
                      #13

                      Something like this function (need platform SDK to compile): BOOL ValidateEMailAddresses(CallContextObj *pCallContextObj) { pCallContextObj->LoadSQLStatementBuffer(7451); pCallContextObj->ParseSQL(); DBStatement *pStmt = pCallContextObj->ExecSQL(); if (pStmt) { DBConnection oUpdateConn; DBStatement oUpdateStmt(&oUpdateConn); int iVerifyCount = 0; if (pCallContextObj->GetApplication()->Connect2DB(&oUpdateConn)) { long lRecipientKey; char caDomainName[256]; char caDomainNameHold[256]; char caUserName[256]; int iResponse; strcpy(caDomainNameHold,cpUnknownStr); BOOL bConnected = FALSE; int iVerifyStatus; LPCSTR cpUpdateSQL = pCallContextObj->GetSQLStatementPtr(7453); char *cpWorkBuf = pCallContextObj->GetWorkBufferPtr(); char *cpUpdateBuf = pCallContextObj->GetCookieBufferPtr(); pCallContextObj->SetSQLStatement(""); CSMTPSocket oMailSock; while (pStmt->FetchNext()) { pStmt->GetCharBuf(1,cpUpdateBuf); lRecipientKey = pStmt->GetLong(2); char *p = strchr(cpUpdateBuf,'@'); if (p) { *p = 0; strcpy(caUserName,cpUpdateBuf); strcpy(caDomainName,p+1); } else { strcpy(caDomainName,cpUpdateBuf); strcpy(caUserName,cpUpdateBuf); } if (strcmp(caDomainNameHold,caDomainName)) { if (bConnected) { // QUIT strcpy(cpWorkBuf,"QUIT \r\n"); oMailSock.Send(cpWorkBuf,strlen(cpWorkBuf)); oMailSock.Receive(cpWorkBuf,pCallContextObj->GetWorkBufferSize()); oMailSock.Close(); bConnected = FALSE; } DNS_RECORD* ppQueryResultsSet = NULL; DNS_STATUS statusDNS = ::DnsQuery(caDomainName, DNS_TYPE_MX, DNS_QUERY_STANDARD, NULL, &ppQueryResultsSet, NULL ); if (statusDNS == ERROR_SUCCESS) { strcpy(cpWorkBuf,ppQueryResultsSet->Data.MX.pNameExchange); if (oMailSock.Create() && oMailSock.Connect(cpWorkBuf,25,""))

                      1 Reply Last reply
                      0
                      • T Tom Archer

                        I'm getting COM exceptions trying to download the Mailer. Cheers, Tom Archer, Inside C# Mainstream is just a word for the way things always have been -- just a middle-of-the-road, tow-the-line thing; a front for the Man serving up the same warmed-over slop he did yesterday and expecting you to say, "Thank you sir, may I have another?"

                        J Offline
                        J Offline
                        Juan Carlos Cobas
                        wrote on last edited by
                        #14

                        It worked fine to me.

                        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