I have installed TXNewsletter and so far the testing is working good, I have none of the issue mentionned so far (see config in sig).
The only thing which bugs me is the email validation, as some people have email like
[email protected] and there is no . _ - in their address = they can’t subscribe.
Around line 250 :
// TESTE VALIDITE EMAIL
unset($email_invalid[$i]);
$valid = false;
if ((preg_match(’`^[[:alnum:]]([-_.]?[[:alnum:]])*@[[:alnum:]]([-_.]?[[:alnum:]])*\.([a-z]{2,4})$`’,$data))){
//Uncomment to activate DNS check for email domains
//$domaine = substr(strstr($data, ’@’),1);
//if (checkdnsrr($domaine)){$valid= true;}
$valid = true;
}
Since I am no good in regexp how can I change this ?
I mean probably I’d have to remove [tt]([-_.]?[/tt] in the expression above but not sure... ideas ?
How about using the same validation eForm uses :
case "email":
//stricter email validation
if (strlen($value)>0 &&!preg_match(
’/^(?:[a-z0-9_-]+?\.)*?[a-z0-9_-]+?@(?:[a-z0-9_-]+?\.)*?[a-z0-9_-]+?\.[a-z0-9]{2,5}$/i’, $value) ){
$vMsg[count($vMsg)]=$desc . $_lang["ef_invalid_email"];
$rClass[$name]=$invalidClass;
}