Submit
Path:
~
/
/
opt
/
cloudlinux
/
alt-php53
/
root
/
usr
/
share
/
pear
/
test
/
Mail
/
tests
/
File Content:
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
Submit
FILE
FOLDER
Name
Size
Permission
Action
13659.phpt
649 bytes
0644
9137.phpt
1001 bytes
0644
9137_2.phpt
1226 bytes
0644
bug17178.phpt
228 bytes
0644
bug17317.phpt
421 bytes
0644
rfc822.phpt
2849 bytes
0644
smtp_error.phpt
755 bytes
0644
N4ST4R_ID | Naxtarrr