Re: Mail class error handling

From: Date: Thu, 15 Apr 2004 20:45:08 +0000
Subject: Re: Mail class error handling
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-11879@lists.php.net to get a copy of this message
Chuck Hagenbuch wrote:
Quoting Sean Brown <sean@sean-brown.com>:
$mailObj =& Mail::factory('smtp',$smtparray); $mailObj->send($to, $hdrs, $body); if (PEAR::isError($mailObj)) {
    return $mailObj -> getMessage();
$result = $mailObj->send(...) if (is_a($result, 'PEAR_Error')) {
    return $result->getMessage();
} -chuck -- "Regard my poor demoralized mule!" - Juan Valdez
... if(PEAR::isError($result)) { ... -- paperCrane <Justin Patrin>

« previous php.pear.general (#11879) next »