mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 01:28:19 +01:00
New: Enhance log reports
New: Add a warning if email syntaxt is not valid Fix: Synchro of contact to a LDAP
This commit is contained in:
@@ -203,27 +203,6 @@ function dol_print_object_info($object)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* \brief Return true if email syntax is ok
|
||||
* \param address email (Ex: "toto@titi.com", "John Do <johndo@titi.com>")
|
||||
* \return boolean true if email syntax is OK, false if KO
|
||||
*/
|
||||
function isValidEmail($address)
|
||||
{
|
||||
if (eregi(".*<(.+)>", $address, $regs)) {
|
||||
$address = $regs[1];
|
||||
}
|
||||
// 3 letters domains extensions: biz|com|edu|gov|int|mil|net|org|pro
|
||||
if (eregi("^[^@ ]+@([a-zA-Z0-9\-]+\.)+([a-zA-Z0-9\-]{2,3}|asso|aero|coop|info|name)\$",$address))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Return true if email has a domain name that can't be resolved
|
||||
* \param mail adresse email (Ex: "toto@titi.com", "John Do <johndo@titi.com>")
|
||||
|
||||
Reference in New Issue
Block a user