Re: SMTP return values

From: Date: Mon, 06 Jan 2003 16:17:25 +0000
Subject: Re: SMTP return values
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-12164@lists.php.net to get a copy of this message
On Mon, Jan 06, 2003 at 10:24:35AM -0300, Xavier Noguer wrote: > > I'm considering changing the API to instead return a 2-tuple > > containing the SMTP response code and message instead of the rather > > vague 'true' value. Errors would still result in a PEAR_Error object > > being returned. > > I havn't even used the class, so I'm going out on a limb here, but I think > you could have a couple of methods getLastRespondeCode() and getLastMessage() > to return the last code and message from a successful SMTP call. That way you > would keep backwards compatibilty. Yes, that's actually what I decided this morning while in the shower. =) I'm going to leave the response code and message as public member variables and provide a getReponse() method that returns a tuple of the two. That should satisfy everyone's requirements without breaking compatibility. -- Jon Parise (jon@php.net) :: The PHP Project (http://www.php.net/)

« previous php.pear.dev (#12164) next »