The code below is not very good, dispite several hours of work. eee@eee.com is ok. It does fail on addresses where there is no valid domain, but my code does not determine if the user account is valid. Before I continue to rack my brains, can I actually determine if a given email address is valid? Can Email::Valid or any other module actually call the mx daemon at ee.com to see if the given account, eee, is valid?
I continue to look, but am beginning to realise the best way is to talk directly to the smtp port directly, but I fear the code could develope into a nightmare...I sense this is really easy and I am just missing the point. Can someone hit me with a 2x4?
Please advise,
Simon
if($EmailAddress) { eval { if (my $addr = Email::Valid->address( -address => $EmailAd +dress, function start() { document.forms[0].elements[0].focus(); } </SCRIPT> </HEAD> <body bgcolor='ffffcc' onLoad='start()'> "; generate_form(); my $EmailAddress = $cgi->param('EmailAddress'); if($EmailAddress) { eval { if (my $addr = Email::Valid->address( -address => $EmailAd +dress, -mxcheck => 1, -fudge => 1 )) { print "$addr OK\n"; } else { print "$addr failed $Email::Valid::Details check.\n"; } }; warn "an error was encountered: $@" if $@; } print end_html();
In reply to Determining a valid address by sdyates
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |