cvs: pear /Net_LMTP package.xml test_lmtp.php

From: Date: Fri, 08 Apr 2005 01:51:43 +0000
Subject: cvs: pear /Net_LMTP package.xml test_lmtp.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-31039@lists.php.net to get a copy of this message
damian Thu Apr 7 21:51:43 2005 EDT Added files: /pear/Net_LMTP package.xml test_lmtp.php Log: RELEASE_1_0_1 http://cvs.php.net/co.php/pear/Net_LMTP/package.xml?r=1.1&p=1 Index: pear/Net_LMTP/package.xml +++ pear/Net_LMTP/package.xml <?xml version="1.0" encoding="ISO-8859-1" ?> <!-- do not use the "Type" attribute here, that one is only for generated package.xml files --> <package version="1.0"> <name>Net_LMTP</name> <summary>Provides an implementation of the RFC2033 LMTP protocol</summary> <description> Provides an implementation of the RFC2033 LMTP using PEAR's Net_Socket and Auth_SASL class. </description> <license>PHP License</license> <maintainers> <maintainer> <user>damian</user> <role>lead</role> <name>Damian Alejandro Fernandez Sosa</name> <email>damlists@cnba.uba.ar</email> </maintainer> </maintainers> <release> <version>1.0.1</version> <date>2004-08-25</date> <notes> * Fixed a bug in SIZE handling (thanks to Steffen Hansen for bug report) * Marked as Stable </notes> <state>stable</state> <filelist> <file role="php" baseinstalldir="Net">LMTP.php</file> <file role="test">test_lmtp.php</file> </filelist> <deps> <dep type="pkg" rel="has">Net_Socket</dep> </deps> </release> <changelog> <release> <version>0.7.0</version> <date>2004-03-02</date> <notes> * Removed dependency on Auth_SASL, but if installed automatically uses it probiding DIGEST-MD5 and CRAM-MD5 auth methods * Marked as stable </notes> <state>stable</state> <filelist> <file role="php" baseinstalldir="Net">LMTP.php</file> <file role="test">test_lmtp.php</file> </filelist> <deps> <dep type="pkg" rel="has">Net_Socket</dep> </deps> </release> <release> <version>0.6</version> <date>2003-03-27</date> <notes> - Fixed a bug in DIGEST-MD5 Auth Method. - Now Uses defaults values in constructor. </notes> <state>beta</state> <deps> <dep type="pkg" rel="has">Net_Socket</dep> <dep type="pkg" rel="has">Auth_SASL</dep> </deps> </release> <release> <version>0.5</version> <date>2003-03-24</date> <notes> - All methods are implemmented based on Net_SMTP </notes> <state>beta</state> <deps> <dep type="pkg" rel="has">Net_Socket</dep> <dep type="pkg" rel="has">Auth_SASL</dep> </deps> </release> </changelog> </package> http://cvs.php.net/co.php/pear/Net_LMTP/test_lmtp.php?r=1.1&p=1 Index: pear/Net_LMTP/test_lmtp.php +++ pear/Net_LMTP/test_lmtp.php <? // // +----------------------------------------------------------------------+ // | PHP Version 4 | // +----------------------------------------------------------------------+ // | Copyright (c) 1997-2003 The PHP Group | // +----------------------------------------------------------------------+ // | This source file is subject to version 2.02 of the PHP license, | // | that is bundled with this package in the file LICENSE, and is | // | available at through the world-wide-web at | // | http://www.php.net/license/2_02.txt. | // | If you did not receive a copy of the PHP license and are unable to | // | obtain it through the world-wide-web, please send a note to | // | license@php.net so we can mail you a copy immediately. | // +----------------------------------------------------------------------+ // | Authors: Chuck Hagenbuch <chuck@horde.org> | // | Jon Parise <jon@php.net> | // | Damian Alejandro Fernandez Sosa <damlists@cnba.uba.ar> | // +----------------------------------------------------------------------+ require_once('Net/LMTP.php'); // The LMTP server $host="localhost"; // The default LMTP port $port="2003"; // The username to authenticate to the LMTP server $user="cyrus"; // The password to authenticate to the LMTP server $pwd="password"; //you can create a file called passwords.php and store your $user,$pass,$host and $port values in it // or you can modify this script @require_once("./passwords.php"); // The name we send to initiate the LMTP dialog $localhost="localhost"; // The email as we send the email in the LMTP dialog $from="damian@cnba.uba.ar"; // The email to send the email in the LMTP dialog //$to="damian@fernandezsosa.com.ar"; $to="damian@1aaafernandezsosa.com.ar"; //$to="damian"; // The email text (RFC822 format) $email="From:damian@cnba.uba.ar\r\nTo:damian@cnba.uba.ar\r\nDate: Wed, 12 Feb 2004 21:07:35 -300\r\nSubject: testing LMTP\r\n\r\nthis is a test email\r\n"; // We create the Net_LMTP instance $lmtp_conn= new Net_LMTP( $host , $port , $localhost); $lmtp_conn->setDebug(true); // Connect to the LMTP server if (PEAR::isError( $error = $lmtp_conn->connect())) { echo "ERROR:" . $error->getMessage() . "\n"; exit(); } // Authenticates against the LMTP server using PLAIN method. if (PEAR::isError( $error = $lmtp_conn->auth($user,$pwd,'PLAIN'))) { echo "ERROR:" . $error->getMessage() . "\n"; exit(); } // Send the MAIL FROM: LMTP command if (PEAR::isError( $error = $lmtp_conn->mailFrom($from))) { echo "ERROR:" . $error->getMessage() . "\n"; exit(); } // Send the RCPT TO: LMTP command if (PEAR::isError( $error = $lmtp_conn->rcptTo($to))) { echo "ERROR:" . $error->getMessage() . "\n"; exit(); } // Send the DATA: LMTP command (we send the email RFC822 encoded) if (PEAR::isError( $error = $lmtp_conn->data($email))) { echo "ERROR:" . $error->getMessage() . "\n"; exit(); } // now the email was accepted by the LMTP server, so we close // the connection // Send the QUIT LMTP command and disconnect from the LMTP server if (PEAR::isError( $error = $lmtp_conn->disconnect())) { echo "ERROR:" . $error->getMessage() . "\n"; exit(); } ?>

« previous php.pear.cvs (#31039) next »