Skip to content
Snippets Groups Projects
Commit a708a965 authored by Marius Burkard's avatar Marius Burkard
Browse files

Improve handling

parent 542538fc
No related branches found
No related tags found
No related merge requests found
......@@ -123,13 +123,14 @@ class page_action extends tform_actions {
if(trim($this->dataRecord['destination']) == '') {
$app->tform->errorMessage .= $app->tform->lng('destination_error_empty') . '<br />';
} else {
$targets = preg_split('/\s*[,;]\s*/', trim($this->dataRecord['destination']));
$targets = preg_split('/[,;\s]+/', trim($this->dataRecord['destination']));
foreach($targets as $target) {
if(!$target || filter_var($target, FILTER_VALIDATE_EMAIL) === false) {
$app->tform->errorMessage .= $app->tform->lng('destination_error_isemail') . '<br />';
break;
}
}
$this->dataRecord['destination'] = implode(', ', $targets);
}
//* Check if there is no active mailbox with this address
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment