Code Duplication    Length = 19-19 lines in 2 locations

htdocs/util/notification/run_notify.php 1 location

@@ 234-252 (lines=19) @@
231
/**
232
 * @param string $domain
233
 */
234
function is_existent_maildomain($domain)
235
{
236
    $smtp_serverlist = [];
237
    $smtp_serverweight = [];
238
239
    if (getmxrr($domain, $smtp_serverlist, $smtp_serverweight) != false) {
240
        if (count($smtp_serverlist) > 0) {
241
            return true;
242
        }
243
    }
244
245
    // check if A exists
246
    $a = dns_get_record($domain, DNS_A);
247
    if (count($a) > 0) {
248
        return true;
249
    }
250
251
    return false;
252
}
253
254
function getToMailDomain($mail)
255
{

htdocs/util/watchlist/runwatch.php 1 location

@@ 550-568 (lines=19) @@
547
/**
548
 * @param string $domain
549
 */
550
function is_existent_maildomain($domain)
551
{
552
    $smtp_serverlist = [];
553
    $smtp_serverweight = [];
554
555
    if (getmxrr($domain, $smtp_serverlist, $smtp_serverweight) != false) {
556
        if (count($smtp_serverlist) > 0) {
557
            return true;
558
        }
559
    }
560
561
    // check if A exists
562
    $a = dns_get_record($domain, DNS_A);
563
    if (count($a) > 0) {
564
        return true;
565
    }
566
567
    return false;
568
}
569
570
571
function getToMailDomain($mail)