Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

This commit was manufactured by cvs2svn to create tag 'RELEASE_1_1_1'.

  • Loading branch information...
commit 967570fd8ac86f401018514fe6fed46727b54635 1 parent 27d82b1
PHP SVN authored
97 docs/test_AUTH.php
... ... @@ -1,97 +0,0 @@
1   -<?
2   -//
3   -// +----------------------------------------------------------------------+
4   -// | PHP Version 4 |
5   -// +----------------------------------------------------------------------+
6   -// | Copyright (c) 1997-2003 The PHP Group |
7   -// +----------------------------------------------------------------------+
8   -// | This source file is subject to version 2.02 of the PHP license, |
9   -// | that is bundled with this package in the file LICENSE, and is |
10   -// | available at through the world-wide-web at |
11   -// | http://www.php.net/license/2_02.txt. |
12   -// | If you did not receive a copy of the PHP license and are unable to |
13   -// | obtain it through the world-wide-web, please send a note to |
14   -// | license@php.net so we can mail you a copy immediately. |
15   -// +----------------------------------------------------------------------+
16   -// | Authors: Chuck Hagenbuch <chuck@horde.org> |
17   -// | Jon Parise <jon@php.net> |
18   -// | Damian Alejandro Fernandez Sosa <damlists@cnba.uba.ar> |
19   -// +----------------------------------------------------------------------+
20   -
21   -
22   -/*
23   - This example shows you how to use the Net_SMTP class
24   - to autheticate to the SMTP server to send an email
25   -
26   - On error the script halts
27   -*/
28   -
29   -require_once('Net/SMTP.php');
30   -
31   -
32   -
33   -// The SMTP server
34   -$host="localhost";
35   -
36   -// The default SMTP port
37   -$port="25";
38   -// The name we send to initiate the SMTP dialog
39   -$localhost="localhost";
40   -
41   -// The email as we send the email in the SMTP dialog
42   -$from="user1@domain.net";
43   -// The email to send the email in the SMTP dialog
44   -$to="user2@domain.net";
45   -
46   -// The email text (RFC822 format)
47   -$email="Subject: testing\r\n\r\nthis is a test email\r\n";
48   -
49   -
50   -// The username to authenticate to the SMTP server
51   -$user="username";
52   -// The password to authenticate to the SMTP server
53   -$pwd="password";
54   -
55   -// We create the Net_SMTP instance
56   -$smtp_conn= new Net_SMTP( $host , $port , $localhost);
57   -
58   -
59   -// Connect to the SMTP server
60   -if (PEAR::isError( $error = $smtp_conn->connect())) {
61   - echo "ERROR:" . $error->getMessage() . "\n";
62   - exit();
63   -}
64   -// Authenticates against the SMTP server
65   -if (PEAR::isError( $error = $smtp_conn->auth($user,$pwd))) {
66   - echo "ERROR:" . $error->getMessage() . "\n";
67   - exit();
68   -}
69   -// Send the MAIL FROM: SMTP command
70   -if (PEAR::isError( $error = $smtp_conn->mailFrom($from))) {
71   - echo "ERROR:" . $error->getMessage() . "\n";
72   - exit();
73   -}
74   -
75   -// Send the RCPT TO: SMTP command
76   -if (PEAR::isError( $error = $smtp_conn->rcptTo($to))) {
77   - echo "ERROR:" . $error->getMessage() . "\n";
78   - exit();
79   -}
80   -
81   -// Send the DATA: SMTP command (we send the email RFC822 encoded)
82   -if (PEAR::isError( $error = $smtp_conn->data($email))) {
83   - echo "ERROR:" . $error->getMessage() . "\n";
84   - exit();
85   -}
86   -// now the email was accepted by the SMTP server, so we close
87   -// the connection
88   -
89   -
90   -// Send the QUIT SMTP command and disconnect from the SMTP server
91   -if (PEAR::isError( $error = $smtp_conn->disconnect())) {
92   - echo "ERROR:" . $error->getMessage() . "\n";
93   - exit();
94   -}
95   -
96   -
97   -?>
91 docs/test_DEBUG.php
... ... @@ -1,91 +0,0 @@
1   -<?
2   -//
3   -// +----------------------------------------------------------------------+
4   -// | PHP Version 4 |
5   -// +----------------------------------------------------------------------+
6   -// | Copyright (c) 1997-2003 The PHP Group |
7   -// +----------------------------------------------------------------------+
8   -// | This source file is subject to version 2.02 of the PHP license, |
9   -// | that is bundled with this package in the file LICENSE, and is |
10   -// | available at through the world-wide-web at |
11   -// | http://www.php.net/license/2_02.txt. |
12   -// | If you did not receive a copy of the PHP license and are unable to |
13   -// | obtain it through the world-wide-web, please send a note to |
14   -// | license@php.net so we can mail you a copy immediately. |
15   -// +----------------------------------------------------------------------+
16   -// | Authors: Chuck Hagenbuch <chuck@horde.org> |
17   -// | Jon Parise <jon@php.net> |
18   -// | Damian Alejandro Fernandez Sosa <damlists@cnba.uba.ar> |
19   -// +----------------------------------------------------------------------+
20   -
21   -
22   -/*
23   - This example shows you how to use the Net_SMTP class
24   - debug the SMTP dialog
25   -
26   - On error the script halts
27   -*/
28   -
29   -require_once('Net/SMTP.php');
30   -
31   -
32   -
33   -// The SMTP server
34   -$host="localhost";
35   -
36   -// The default SMTP port
37   -$port="25";
38   -// The name we send to initiate the SMTP dialog
39   -$localhost="localhost";
40   -
41   -// The email as we send the email in the SMTP dialog
42   -$from="user1@domain.net";
43   -// The email to send the email in the SMTP dialog
44   -$to="user2@domain.net";
45   -
46   -// The email text (RFC822 format)
47   -$email="Subject: testing\r\n\r\nthis is a test email\r\n";
48   -
49   -
50   -// We create the Net_SMTP instance
51   -$smtp_conn= new Net_SMTP( $host , $port , $localhost);
52   -
53   -
54   -// Set the debug mode on
55   -$smtp_conn->setDebug(true);
56   -
57   -// Connect to the SMTP server
58   -if (PEAR::isError( $error = $smtp_conn->connect())) {
59   - echo "ERROR:" . $error->getMessage() . "\n";
60   - exit();
61   -}
62   -
63   -// Send the MAIL FROM: SMTP command
64   -if (PEAR::isError( $error = $smtp_conn->mailFrom($from))) {
65   - echo "ERROR:" . $error->getMessage() . "\n";
66   - exit();
67   -}
68   -
69   -// Send the RCPT TO: SMTP command
70   -if (PEAR::isError( $error = $smtp_conn->rcptTo($to))) {
71   - echo "ERROR:" . $error->getMessage() . "\n";
72   - exit();
73   -}
74   -
75   -// Send the DATA: SMTP command (we send the email RFC822 encoded)
76   -if (PEAR::isError( $error = $smtp_conn->data($email))) {
77   - echo "ERROR:" . $error->getMessage() . "\n";
78   - exit();
79   -}
80   -// now the email was accepted by the SMTP server, so we close
81   -// the connection
82   -
83   -
84   -// Send the QUIT SMTP command and disconnect from the SMTP server
85   -if (PEAR::isError( $error = $smtp_conn->disconnect())) {
86   - echo "ERROR:" . $error->getMessage() . "\n";
87   - exit();
88   -}
89   -
90   -
91   -?>
89 docs/test_SIMPLE.php
... ... @@ -1,89 +0,0 @@
1   -<?
2   -//
3   -// +----------------------------------------------------------------------+
4   -// | PHP Version 4 |
5   -// +----------------------------------------------------------------------+
6   -// | Copyright (c) 1997-2003 The PHP Group |
7   -// +----------------------------------------------------------------------+
8   -// | This source file is subject to version 2.02 of the PHP license, |
9   -// | that is bundled with this package in the file LICENSE, and is |
10   -// | available at through the world-wide-web at |
11   -// | http://www.php.net/license/2_02.txt. |
12   -// | If you did not receive a copy of the PHP license and are unable to |
13   -// | obtain it through the world-wide-web, please send a note to |
14   -// | license@php.net so we can mail you a copy immediately. |
15   -// +----------------------------------------------------------------------+
16   -// | Authors: Chuck Hagenbuch <chuck@horde.org> |
17   -// | Jon Parise <jon@php.net> |
18   -// | Damian Alejandro Fernandez Sosa <damlists@cnba.uba.ar> |
19   -// +----------------------------------------------------------------------+
20   -
21   -
22   -/*
23   - This example shows you how to use the Net_SMTP class
24   - send an email
25   -
26   - On error the script halts
27   -*/
28   -
29   -require_once('Net/SMTP.php');
30   -
31   -
32   -
33   -// The SMTP server
34   -$host="localhost";
35   -
36   -// The default SMTP port
37   -$port="25";
38   -// The name we send to initiate the SMTP dialog
39   -$localhost="localhost";
40   -
41   -// The email as we send the email in the SMTP dialog
42   -$from="user1@domain.net";
43   -// The email to send the email in the SMTP dialog
44   -$to="user2@domain.net";
45   -
46   -// The email text (RFC822 format)
47   -$email="Subject: testing email\r\n\r\nthis is a test email\r\n";
48   -
49   -
50   -
51   -// We create the Net_SMTP instance
52   -$smtp_conn= new Net_SMTP( $host , $port , $localhost);
53   -
54   -
55   -// Connect to the SMTP server
56   -if (PEAR::isError( $error = $smtp_conn->connect())) {
57   - echo "ERROR:" . $error->getMessage() . "\n";
58   - exit();
59   -}
60   -
61   -// Send the MAIL FROM: SMTP command
62   -if (PEAR::isError( $error = $smtp_conn->mailFrom($from))) {
63   - echo "ERROR:" . $error->getMessage() . "\n";
64   - exit();
65   -}
66   -
67   -// Send the RCPT TO: SMTP command
68   -if (PEAR::isError( $error = $smtp_conn->rcptTo($to))) {
69   - echo "ERROR:" . $error->getMessage() . "\n";
70   - exit();
71   -}
72   -
73   -// Send the DATA: SMTP command (we send the email RFC822 encoded)
74   -if (PEAR::isError( $error = $smtp_conn->data($email))) {
75   - echo "ERROR:" . $error->getMessage() . "\n";
76   - exit();
77   -}
78   -// now the email was accepted by the SMTP server, so we close
79   -// the connection
80   -
81   -
82   -// Send the QUIT SMTP command and disconnect from the SMTP server
83   -if (PEAR::isError( $error = $smtp_conn->disconnect())) {
84   - echo "ERROR:" . $error->getMessage() . "\n";
85   - exit();
86   -}
87   -
88   -
89   -?>

0 comments on commit 967570f

Please sign in to comment.
Something went wrong with that request. Please try again.