Mercurial > hg > rc1
comparison vendor/pear/net_smtp/tests/auth.phpt @ 0:1e000243b222
vanilla 1.3.3 distro, I hope
author | Charlie Root |
---|---|
date | Thu, 04 Jan 2018 15:50:29 -0500 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:1e000243b222 |
---|---|
1 --TEST-- | |
2 Net_SMTP: SMTP Authentication | |
3 --SKIPIF-- | |
4 <?php if (!@include('config.php')) die("skip\n"); | |
5 --FILE-- | |
6 <?php | |
7 | |
8 require_once 'Net/SMTP.php'; | |
9 require_once 'config.php'; | |
10 | |
11 if (! ($smtp = new Net_SMTP(TEST_HOSTNAME, TEST_PORT, TEST_LOCALHOST))) { | |
12 die("Unable to instantiate Net_SMTP object\n"); | |
13 } | |
14 | |
15 if (PEAR::isError($e = $smtp->connect())) { | |
16 die($e->getMessage() . "\n"); | |
17 } | |
18 | |
19 if (PEAR::isError($e = $smtp->auth(TEST_AUTH_USER, TEST_AUTH_PASS))) { | |
20 die("Authentication failure\n"); | |
21 } | |
22 | |
23 $smtp->disconnect(); | |
24 | |
25 echo 'Success!'; | |
26 | |
27 --EXPECT-- | |
28 Success! |