What are you using?
-
I posted a question in the ASP .Net forums for a code answer but all my googling is telling me there isn't a code answer and this http://www.codeproject.com/aspnet/Valid_Email_Addresses.asp[^] doesn't work with all domains tested. I've found some "paid" libraries for $150 that I can buy but was wondering what if anything some of you might be using to validate email addresses? Regular expressions just test the format but don't actually attempt to connect to the SMTP server and get responses. This is what I use for manual verification http://www.zmailer.org/mxverify.html[^]. So I guess I'll put it like this. I'm cheap. When I first told the client I could do mail verification I thought the article here would be fine as it worked with all the private addresses I tested it with. Never in my wildest did I think it would fail with domains like gmail but it does. So now I'm up a creek as I don't want to spend money but the article here isn't going to cut it. So you got any cheap solutions?
This is what I use for manual verification http://www.zmailer.org/mxverify.html[^]. That's a pretty cool service. Someone who understands how it works should write an article on how to do the same thing automatically using C# and ASP.NET! If I knew how I would, but unfortunately I don't. :(
-
This is what I use for manual verification http://www.zmailer.org/mxverify.html[^]. That's a pretty cool service. Someone who understands how it works should write an article on how to do the same thing automatically using C# and ASP.NET! If I knew how I would, but unfortunately I don't. :(
You can do it with Telnet and sockets. That's just a lot of work. All it's doing is issuing telnet commands to port 25 on the specified server after it does a DNS lookup to get the list of mail servers for the domain. I just don't want to spend 2 straight days (or more) writing that honking thing. I've done sockets in C# and while it's not hard it's tedious and I don't have the time for tedious.:sigh:
-
You can do it with Telnet and sockets. That's just a lot of work. All it's doing is issuing telnet commands to port 25 on the specified server after it does a DNS lookup to get the list of mail servers for the domain. I just don't want to spend 2 straight days (or more) writing that honking thing. I've done sockets in C# and while it's not hard it's tedious and I don't have the time for tedious.:sigh:
-
http://support.microsoft.com/kb/153119[^] This is pretty much what is going on in a nut shell...
-
I posted a question in the ASP .Net forums for a code answer but all my googling is telling me there isn't a code answer and this http://www.codeproject.com/aspnet/Valid_Email_Addresses.asp[^] doesn't work with all domains tested. I've found some "paid" libraries for $150 that I can buy but was wondering what if anything some of you might be using to validate email addresses? Regular expressions just test the format but don't actually attempt to connect to the SMTP server and get responses. This is what I use for manual verification http://www.zmailer.org/mxverify.html[^]. So I guess I'll put it like this. I'm cheap. When I first told the client I could do mail verification I thought the article here would be fine as it worked with all the private addresses I tested it with. Never in my wildest did I think it would fail with domains like gmail but it does. So now I'm up a creek as I don't want to spend money but the article here isn't going to cut it. So you got any cheap solutions?
-
I posted a question in the ASP .Net forums for a code answer but all my googling is telling me there isn't a code answer and this http://www.codeproject.com/aspnet/Valid_Email_Addresses.asp[^] doesn't work with all domains tested. I've found some "paid" libraries for $150 that I can buy but was wondering what if anything some of you might be using to validate email addresses? Regular expressions just test the format but don't actually attempt to connect to the SMTP server and get responses. This is what I use for manual verification http://www.zmailer.org/mxverify.html[^]. So I guess I'll put it like this. I'm cheap. When I first told the client I could do mail verification I thought the article here would be fine as it worked with all the private addresses I tested it with. Never in my wildest did I think it would fail with domains like gmail but it does. So now I'm up a creek as I don't want to spend money but the article here isn't going to cut it. So you got any cheap solutions?
A quick solution would be to use the existing zmailer.org script, if you issue a
WebRequest
to e.g:http://zmailer.org/cgi-bin/mxverify-cgi?DOMAIN=`{EMAILADDRESS}`&SUBMIT=SUBMIT+KV9.FI+NETWORK
And then parse the result looking for the "Apparently OK" message. It might be worth asking them first just to check they have no problems, explain that it's a temporary stop-gap while you write it properly ;)
-
I posted a question in the ASP .Net forums for a code answer but all my googling is telling me there isn't a code answer and this http://www.codeproject.com/aspnet/Valid_Email_Addresses.asp[^] doesn't work with all domains tested. I've found some "paid" libraries for $150 that I can buy but was wondering what if anything some of you might be using to validate email addresses? Regular expressions just test the format but don't actually attempt to connect to the SMTP server and get responses. This is what I use for manual verification http://www.zmailer.org/mxverify.html[^]. So I guess I'll put it like this. I'm cheap. When I first told the client I could do mail verification I thought the article here would be fine as it worked with all the private addresses I tested it with. Never in my wildest did I think it would fail with domains like gmail but it does. So now I'm up a creek as I don't want to spend money but the article here isn't going to cut it. So you got any cheap solutions?
This regex will verify any RFC 822 email address:) (?:(?:\r\n)?[ \t])*(?:(?:(?:[^()<>@,;:\\".\[\] \x00-\x1F]+(?:(?: (?:\r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[\] \x00-\x1F]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\ ["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?: (?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \
-
This regex will verify any RFC 822 email address:) (?:(?:\r\n)?[ \t])*(?:(?:(?:[^()<>@,;:\\".\[\] \x00-\x1F]+(?:(?: (?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\. |(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t] )*(?:[^()<>@,;:\\".\[\] \x00-\x1F]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?= [\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"( ?:(?:\r\n)?[ \t])*))*@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \ x00-\x1F]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\ [([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t]) *(?:[^()<>@,;:\\".\[\] \x00-\x1F]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[ \["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])* ))*|(?:[^()<>@,;:\\".\[\] \x00-\x1F]+(?:(?:(?:\r\n)?[ \t])+|\Z|( ?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))* "(?:(?:\r\n)?[ \t])*)*\<(?:(?:\r\n)?[ \t])*(?:@(?:[^()<>@,;:\\". \[\] \x00-\x1F]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\ 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\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*\>( ?:(?:\r\n)?[ \t])*)|(?:[^()<>@,;:\\".\[\] \x00-\x1F]+(?:(?:(?:\r \n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:( ?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*)*:(?:(?:\r\n)?[ \t])*(?:(?: (?:[^()<>@,;:\\".\[\] \x00-\x1F]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\ ["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?: (?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \
-
This regex will verify any RFC 822 email address:) (?:(?:\r\n)?[ \t])*(?:(?:(?:[^()<>@,;:\\".\[\] \x00-\x1F]+(?:(?: (?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\. |(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t] )*(?:[^()<>@,;:\\".\[\] \x00-\x1F]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?= [\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"( ?:(?:\r\n)?[ \t])*))*@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \ x00-\x1F]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\ [([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t]) *(?:[^()<>@,;:\\".\[\] \x00-\x1F]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[ \["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)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 r\n)?[ \t])*))*@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \x00-\x 1F]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[ \]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^ ()<>@,;:\\".\[\] \x00-\x1F]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()< >@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*\>( ?:(?:\r\n)?[ \t])*)|(?:[^()<>@,;:\\".\[\] \x00-\x1F]+(?:(?:(?:\r \n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:( ?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*)*:(?:(?:\r\n)?[ \t])*(?:(?: (?:[^()<>@,;:\\".\[\] \x00-\x1F]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\ ["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?: (?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \
It's very difficult to get a single Regex that will properly validate ALL of the possible variations in the RFC. There is a MailAddress[^] class available in .NET 2.0 that does a pretty good job of parsing an email address, but even that misses some of the more complex RFC patterns. The best way to do it is to actually write a tokenizer, but that is a lot of work. Why is full RFC compliance necessary? Generally you only need to validate the "commonly used" formats, which the MailAddress class should do for you.
----------------------------- In just two days, tomorrow will be yesterday.
-
I posted a question in the ASP .Net forums for a code answer but all my googling is telling me there isn't a code answer and this http://www.codeproject.com/aspnet/Valid_Email_Addresses.asp[^] doesn't work with all domains tested. I've found some "paid" libraries for $150 that I can buy but was wondering what if anything some of you might be using to validate email addresses? Regular expressions just test the format but don't actually attempt to connect to the SMTP server and get responses. This is what I use for manual verification http://www.zmailer.org/mxverify.html[^]. So I guess I'll put it like this. I'm cheap. When I first told the client I could do mail verification I thought the article here would be fine as it worked with all the private addresses I tested it with. Never in my wildest did I think it would fail with domains like gmail but it does. So now I'm up a creek as I don't want to spend money but the article here isn't going to cut it. So you got any cheap solutions?
As a mail admin I'll point out that very few domains will actually handle the SMTP
VRFY
command, as of course spammers can use it to verify whether their mailing list is accurate. Those that do often implement tarpitting[^] to slow down the spammer. Exchange Server 2003 SP2 supports tarpitting when run on Windows Server 2003 SP1 (I know because I've implemented it). It won't help you for any of my email addresses, for my ISP will accept anything at mydemon.co.uk
subdomain. However, the MX refuses attempts toVRFY
.Stability. What an interesting concept. -- Chris Maunder
-
As a mail admin I'll point out that very few domains will actually handle the SMTP
VRFY
command, as of course spammers can use it to verify whether their mailing list is accurate. Those that do often implement tarpitting[^] to slow down the spammer. Exchange Server 2003 SP2 supports tarpitting when run on Windows Server 2003 SP1 (I know because I've implemented it). It won't help you for any of my email addresses, for my ISP will accept anything at mydemon.co.uk
subdomain. However, the MX refuses attempts toVRFY
.Stability. What an interesting concept. -- Chris Maunder
Is it feasable that you could at least verify the domain was real?
-
Is it feasable that you could at least verify the domain was real?
Yeah - do a DNS lookup for MX records for the domain. If present, it will accept email. I don't think you can do this with the Windows Sockets DNS APIs, though, you'll probably have to actually send a request to the DNS servers yourself. The IP Helper APIs will tell you what DNS server to use. You might find that source to an open-source version of
nslookup
is available, or some other library of DNS tools. You could probably screen-scrape the output of that command instead.Stability. What an interesting concept. -- Chris Maunder
-
It's very difficult to get a single Regex that will properly validate ALL of the possible variations in the RFC. There is a MailAddress[^] class available in .NET 2.0 that does a pretty good job of parsing an email address, but even that misses some of the more complex RFC patterns. The best way to do it is to actually write a tokenizer, but that is a lot of work. Why is full RFC compliance necessary? Generally you only need to validate the "commonly used" formats, which the MailAddress class should do for you.
----------------------------- In just two days, tomorrow will be yesterday.
The regex i posted does validate every possible variation in the RFC. Hence why it is so very very very long (6.5kb). The regex comes from a perl module which does RFC validation on email addresses, i admit that it does go way way over the top. It also allows you to send an email to say, bob@home - which, while valid your server is probably never going to be able to deliver the mail to. But it will make sure that an email address is completely valid, no more mark.harris@itvision.com.au not being a valid email address, as so many websites say.
-- Real programmers don't comment their code. It was hard to write, it should be hard to understand.