$12 GRAYBYTE WORDPRESS FILE MANAGER $80

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 104.21.43.35 | ADMIN IP 216.73.216.180
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : mail

/opt/alt/php72/usr/share/pear/test/Mail/tests/

HOME
Current File : /opt/alt/php72/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


Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
3 Mar 2024 10.54 PM
root / root
0755
13659.phpt
0.634 KB
2 Dec 2021 8.33 AM
root / root
0644
9137.phpt
0.978 KB
2 Dec 2021 8.33 AM
root / root
0644
9137_2.phpt
1.197 KB
2 Dec 2021 8.33 AM
root / root
0644
bug17178.phpt
0.223 KB
2 Dec 2021 8.33 AM
root / root
0644
bug17317.phpt
0.411 KB
2 Dec 2021 8.33 AM
root / root
0644
rfc822.phpt
2.782 KB
2 Dec 2021 8.33 AM
root / root
0644
smtp_error.phpt
0.737 KB
2 Dec 2021 8.33 AM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF