Author |
Topic |
afrika
Master Smack Fu Yak Hacker
2706 Posts |
Posted - 2006-05-20 : 13:04:42
|
Yello !has anyone got any pointers, code snippets, scripts on server side email validation in VB script ?thanksAfrika |
|
Kristen
Test
22859 Posts |
Posted - 2006-05-20 : 13:34:46
|
Its a minefield. If you read the RFC its Open Season for what is actually permitted before and after the '@'. Pretty much the only thing you aren't allowed is more than one @ - but even that is permitted if the other(s) are before the main one, and enclosed in quotes ...... so!!! ... your best bet is to do an MX check on the email address - that will have the additional benefit that some Email servers will actually reject [otherwise valid] email addresses that have no mailbox.(We use Easy Mail Objects for our Server Side stuff - that's the only one I know, and there are others for sure, but we're very happy with it)Kristen |
|
|
afrika
Master Smack Fu Yak Hacker
2706 Posts |
Posted - 2006-05-20 : 16:31:00
|
nice advice. But how do i check an MX record on the fly.......if this is what you are implying ? |
|
|
nr
SQLTeam MVY
12543 Posts |
|
Kristen
Test
22859 Posts |
Posted - 2006-05-21 : 03:22:02
|
"But how do i check an MX record on the fly...."You send an Email, except you only doing the bit of checking that it is deliverable, rather than actually sending a complete one (this is refered to as an "MX Lookup")"...if this is what you are implying ?"Yup!Kristen |
|
|
afrika
Master Smack Fu Yak Hacker
2706 Posts |
Posted - 2006-05-21 : 07:42:38
|
Thanks for your advice, am reading up Nigels referred link.But Kristen, i dont understand ? Are you saying,......I send an email on the fly ? -- this is no problem, using CDONTS or dundas mailer, but how do we check to see if it was delivered or failed "ON THE FLY" ??? Or are you implying to check manually ???Tough cookie, i must say.Afrika |
|
|
Kristen
Test
22859 Posts |
Posted - 2006-05-21 : 07:53:27
|
The MX check is part of the SMTP service - it will report an error immediately if the Domain (and sometimes the mailbox) is not valid.It doesn't actually send an email - it just goes through the "motions"Kristen |
|
|
afrika
Master Smack Fu Yak Hacker
2706 Posts |
Posted - 2006-05-22 : 04:46:12
|
Thanks for the advice Kristen, i still am a bit confused on how you can check this on the fly? Or is it done manually ? |
|
|
Kristen
Test
22859 Posts |
Posted - 2006-05-22 : 05:33:30
|
"i still am a bit confused on how you can check this on the fly"You program your application to do the "MX" test, via an SMTP server, and it gets back an OK or Error code.Have a look at a Google for mx email testKristen |
|
|
afrika
Master Smack Fu Yak Hacker
2706 Posts |
Posted - 2006-05-22 : 10:58:39
|
Thanks a lot Kristen, I guess there is no better way of an email validation, funny we never thought of it this way. |
|
|
Kristen
Test
22859 Posts |
Posted - 2006-05-22 : 11:10:43
|
Its the blighters who wrote the RFC who are to blame ... plus some legacy stuff like the old X400 "bang" addresses (which I believe are still catered for in the RFC).So you can haveMy.Name@MyDomain.comthat's not too hard. ThenMy.Name@[1.2.3]andMy'Name@MyDomain.comwhich breaks quite a few checkers that I've seen.and finally things like"My@Name"@MyDomain.comwhich breaks all of them!The RFC guys should have said "A-Z and 0-9, hyphen underscore and non-trailing '.'" and then we could have just used a RegEx to validate it!Kristen |
|
|
|