Code Duplication    Length = 13-13 lines in 2 locations

manager/includes/controls/phpmailer/PHPMailer.php 2 locations

@@ 1027-1039 (lines=13) @@
1024
1025
            return false;
1026
        }
1027
        if (!static::validateAddress($address)) {
1028
            $error_message = sprintf('%s (%s): %s',
1029
                $this->lang('invalid_address'),
1030
                $kind,
1031
                $address);
1032
            $this->setError($error_message);
1033
            $this->edebug($error_message);
1034
            if ($this->exceptions) {
1035
                throw new Exception($error_message);
1036
            }
1037
1038
            return false;
1039
        }
1040
        if ('Reply-To' != $kind) {
1041
            if (!array_key_exists(strtolower($address), $this->all_recipients)) {
1042
                $this->{$kind}[] = [$address, $name];
@@ 1388-1400 (lines=13) @@
1385
                    continue;
1386
                }
1387
                $this->$address_kind = $this->punyencodeAddress($this->$address_kind);
1388
                if (!static::validateAddress($this->$address_kind)) {
1389
                    $error_message = sprintf('%s (%s): %s',
1390
                        $this->lang('invalid_address'),
1391
                        $address_kind,
1392
                        $this->$address_kind);
1393
                    $this->setError($error_message);
1394
                    $this->edebug($error_message);
1395
                    if ($this->exceptions) {
1396
                        throw new Exception($error_message);
1397
                    }
1398
1399
                    return false;
1400
                }
1401
            }
1402
1403
            // Set whether the message is multipart/alternative