allow mail address with name part for password reset FROM address
This commit is contained in:
parent
09866a9384
commit
e59023b1a9
|
@ -413,6 +413,9 @@ function get_preg($argument, $regexp) {
|
||||||
case "email":
|
case "email":
|
||||||
$pregexpr = '/^([0-9a-zA-Z+\\/\\._-])+[@]([0-9a-zA-Z-])+([.]([0-9a-zA-Z-])+)*$/';
|
$pregexpr = '/^([0-9a-zA-Z+\\/\\._-])+[@]([0-9a-zA-Z-])+([.]([0-9a-zA-Z-])+)*$/';
|
||||||
break;
|
break;
|
||||||
|
case "emailWithName":
|
||||||
|
$pregexpr = '/^([[:alnum:] ])+ <([0-9a-zA-Z+\\/\\._-])+[@]([0-9a-zA-Z-])+([.]([0-9a-zA-Z-])+)*>$/u';
|
||||||
|
break;
|
||||||
case "mailLocalAddress":
|
case "mailLocalAddress":
|
||||||
$pregexpr = '/^([0-9a-zA-Z+\\/\\._-])+([@]([0-9a-zA-Z-])+([.]([0-9a-zA-Z-])+)*)?$/';
|
$pregexpr = '/^([0-9a-zA-Z+\\/\\._-])+([@]([0-9a-zA-Z-])+([.]([0-9a-zA-Z-])+)*)?$/';
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1048,7 +1048,7 @@ class LAMConfig {
|
||||||
*/
|
*/
|
||||||
public function setLamProMailFrom($lamProMailFrom) {
|
public function setLamProMailFrom($lamProMailFrom) {
|
||||||
$this->lamProMailFrom = $lamProMailFrom;
|
$this->lamProMailFrom = $lamProMailFrom;
|
||||||
if (($lamProMailFrom != '') && !get_preg($lamProMailFrom, 'email')) {
|
if (($lamProMailFrom != '') && !get_preg($lamProMailFrom, 'email') && !get_preg($lamProMailFrom, 'emailWithName')) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue