Ticket #1485857 (closed Feature Requests: fixed)
Check E-Mail Addresses
| Reported by: | lacri | Owned by: | |
|---|---|---|---|
| Priority: | 5 | Milestone: | 0.3.1 |
| Component: | Core functionality | Version: | 0.2.2 |
| Severity: | normal | Keywords: | E-Mail Check |
| Cc: | suporte@…, patrickvw |
Description
It would be beautiful if before the dispatch of emails or also with add an email address into the addressbook one would check whether the email address is valid.
Thus avoidable errors in the log would be avoided.
Failed to add recipient 'support@xstreetsl.com.' in /var/www/htdocs/roundcube/program/steps/mail/func.inc on line 1409
I think that would be a very meaningful feature
check via javascript or php ...
function validate_email_mx($email)
{
if(eregi("^[0-9a-z_]([-_.']?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\\.[a-z]{2,4}$",$email,$check))
{
if(getmxrr(substr(strstr($check[0], '@'), 1),$validate_email_temp))
{
return TRUE;
}
if(checkdnsrr(substr(strstr($check[0], '@'), 1),"ANY"))
{
return TRUE;
}
}
return FALSE;
}
function mailcheck(str){
var gesamtemail=/^(\w+(?:\.\w+)*)@((?:\w+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
var vordemat=/^(\w+(?:\.\w+)*)$/i
var domain=/^@((?:\w+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
if (gesamtemail.test(str)) {
return true
}else{
if (domain.test(str)) {
return true
}else{
if (vordemat.test(str)) {
return true
}else{
return false
}
}
}
}
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
