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":
|
||||
$pregexpr = '/^([0-9a-zA-Z+\\/\\._-])+[@]([0-9a-zA-Z-])+([.]([0-9a-zA-Z-])+)*$/';
|
||||
break;
|
||||
case "emailWithName":
|
||||
$pregexpr = '/^([[:alnum:] ])+ <([0-9a-zA-Z+\\/\\._-])+[@]([0-9a-zA-Z-])+([.]([0-9a-zA-Z-])+)*>$/u';
|
||||
break;
|
||||
case "mailLocalAddress":
|
||||
$pregexpr = '/^([0-9a-zA-Z+\\/\\._-])+([@]([0-9a-zA-Z-])+([.]([0-9a-zA-Z-])+)*)?$/';
|
||||
break;
|
||||
|
|
|
@ -1048,7 +1048,7 @@ class LAMConfig {
|
|||
*/
|
||||
public function setLamProMailFrom($lamProMailFrom) {
|
||||
$this->lamProMailFrom = $lamProMailFrom;
|
||||
if (($lamProMailFrom != '') && !get_preg($lamProMailFrom, 'email')) {
|
||||
if (($lamProMailFrom != '') && !get_preg($lamProMailFrom, 'email') && !get_preg($lamProMailFrom, 'emailWithName')) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue