diff options
Diffstat (limited to 'plugins/managesieve/lib')
-rw-r--r-- | plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php b/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php index e4efef5b3..685a66aec 100644 --- a/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php +++ b/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php @@ -871,7 +871,12 @@ class rcube_sieve_engine // @TODO: vacation :mime, :from, :handle foreach ((array)$this->form['actions'][$i]['addresses'] as $aidx => $address) { - if (!rcube_utils::check_email($address)) { + $this->form['actions'][$i]['addresses'][$aidx] = $address = trim($address); + + if (empty($address)) { + unset($this->form['actions'][$i]['addresses'][$aidx]); + } + else if (!rcube_utils::check_email($address)) { $this->errors['actions'][$i]['addresses'] = $this->plugin->gettext('noemailwarning'); break; } |