[wp-trac] [WordPress Trac] #17228: Error: Could not instantiate mail function

WordPress Trac wp-trac at lists.automattic.com
Sun Apr 24 08:48:10 UTC 2011


#17228: Error: Could not instantiate mail function
---------------------------+------------------------------
 Reporter:  vegasgeek      |       Owner:
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  Network Admin  |     Version:  3.1
 Severity:  normal         |  Resolution:
 Keywords:                 |
---------------------------+------------------------------

Comment (by dd32):

 basically, PHPMail now uses exceptions.

 Here's an example of a API function:
 {{{
     if (!self::ValidateAddress($address)) {
       $this->SetError($this->Lang('invalid_address').': '. $address);
       if ($this->exceptions) {
         throw new phpmailerException($this->Lang('invalid_address').':
 '.$address);
       }
       echo $this->Lang('invalid_address').': '.$address;
       return false;
     }
 }}}

 So other than modifying phpmailer to remove all the echo's for any failure
 of any kind, we can wrap every API call in a try {}..

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/17228#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list