SILENT KILLERPanel

Current Path: > > opt > cloudlinux > alt-php82 > root > usr > share > pear > test > Mail > > tests


Operation   : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: //opt/cloudlinux/alt-php82/root/usr/share/pear/test/Mail//tests

NameTypeSizeLast ModifiedActions
13659.phpt File 649 bytes April 06 2023 15:34:24.
9137.phpt File 1001 bytes April 06 2023 15:34:24.
9137_2.phpt File 1226 bytes April 06 2023 15:34:24.
bug17178.phpt File 228 bytes April 06 2023 15:34:24.
bug17317.phpt File 421 bytes April 06 2023 15:34:24.
rfc822.phpt File 2849 bytes April 06 2023 15:34:24.
smtp_error.phpt File 755 bytes April 06 2023 15:34:24.

Reading File: //opt/cloudlinux/alt-php82/root/usr/share/pear/test/Mail//tests/smtp_error.phpt

--TEST--
Mail: SMTP Error Reporting
--SKIPIF--
<?php

require_once 'PEAR/Registry.php';
$registry = new PEAR_Registry();

if (!$registry->packageExists('Net_SMTP')) die("skip\n");
--FILE--
<?php
require_once 'Mail.php';

/* Reference a bogus SMTP server address to guarantee a connection failure. */
$params = array('host' => 'bogus.host.tld');

/* Create our SMTP-based mailer object. */
$mailer = Mail::factory('smtp', $params);

/* Attempt to send an empty message in order to trigger an error. */
$e = $mailer->send(array(), array(), '');
if (is_a($e, 'PEAR_Error')) {
     $err = $e->getMessage();
     if (preg_match('/Failed to connect to bogus.host.tld:25 \[SMTP: Failed to connect socket:.*/i', $err)) {
        echo "OK";
     }
}

--EXPECT--
OK

SILENT KILLER Tool