Skip to content

Commit a708a96

Browse files
author
Marius Burkard
committed
Improve handling
1 parent 542538f commit a708a96

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

interface/web/mail/mail_forward_edit.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,14 @@ function onSubmit() {
123123
if(trim($this->dataRecord['destination']) == '') {
124124
$app->tform->errorMessage .= $app->tform->lng('destination_error_empty') . '<br />';
125125
} else {
126-
$targets = preg_split('/\s*[,;]\s*/', trim($this->dataRecord['destination']));
126+
$targets = preg_split('/[,;\s]+/', trim($this->dataRecord['destination']));
127127
foreach($targets as $target) {
128128
if(!$target || filter_var($target, FILTER_VALIDATE_EMAIL) === false) {
129129
$app->tform->errorMessage .= $app->tform->lng('destination_error_isemail') . '<br />';
130130
break;
131131
}
132132
}
133+
$this->dataRecord['destination'] = implode(', ', $targets);
133134
}
134135

135136
//* Check if there is no active mailbox with this address

0 commit comments

Comments
 (0)