email validation
-
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
The Dundas Mailer[^] is free and has a
ValidateAddress
method that will do the trick. cheers, Chris Maunder -
The Dundas Mailer[^] is free and has a
ValidateAddress
method that will do the trick. cheers, Chris MaunderThanks Chris, I'll give it a try :)
-
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
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 AfricaChris Losinger wrote: i hate needles so much i can't even imagine allowing one near The Little Programmer
-
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 AfricaChris Losinger wrote: i hate needles so much i can't even imagine allowing one near The Little Programmer
-
:confused::confused:
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."
-
The Dundas Mailer[^] is free and has a
ValidateAddress
method that will do the trick. cheers, Chris MaunderI'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?"
-
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
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
-
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
-
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
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
-
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
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,""))
-
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?"
It worked fine to me.