$95 GRAYBYTE WORDPRESS FILE MANAGER $29

SERVER : vnpttt-amd7f72-h1.vietnix.vn #1 SMP Fri May 24 12:42:50 UTC 2024
SERVER IP : 103.200.23.149 | ADMIN IP 216.73.216.22
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

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

HOME
Current File : /opt/alt/php70/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 [ WRITEABLE ]


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

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF