[vhffs-dev] [1380] added checks on the validity of the domain name of emails |
[ Thread Index |
Date Index
| More vhffs.org/vhffs-dev Archives
]
Revision: 1380
Author: gradator
Date: 2009-03-16 13:29:33 +0100 (Mon, 16 Mar 2009)
Log Message:
-----------
added checks on the validity of the domain name of emails
Modified Paths:
--------------
trunk/vhffs-api/src/Vhffs/Functions.pm
Modified: trunk/vhffs-api/src/Vhffs/Functions.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Functions.pm 2009-03-15 21:44:12 UTC (rev 1379)
+++ trunk/vhffs-api/src/Vhffs/Functions.pm 2009-03-16 12:29:33 UTC (rev 1380)
@@ -501,6 +501,10 @@
sub valid_mail
{
my $mail = shift;
+
+ my ( $localpart , $domain ) = ( $mail =~ /(.+)\@(.+)/ );
+ return 0 unless Vhffs::Functions::check_domain_name( $domain );
+
use Email::Valid;
return 1 if( Email::Valid->rfc822 ( $mail ) );
return 0;