Hi,

I have (had) some users getting the following error:

SMTP Error: SMTP error: Failed to add recipient '[EMAIL PROTECTED]'

It happens with the same users continuously.


So I tried adding some debugging to the function that caused this error,
and changed this:


   // set mail recipients
   foreach ($recipients as $recipient)
     {
     if (PEAR::isError($SMTP_CONN->rcptTo($recipient)))
       {
       smtp_reset();
       $SMTP_ERROR .= "Failed to add recipient '$recipient'\n";
       return FALSE;
       }
     }



into this:

   // set mail recipients
   foreach ($recipients as $recipient)
     {
     $error = $SMTP_CONN->rcptTo($recipient);
     if (PEAR::isError($error))
       {
       smtp_reset();
       $SMTP_ERROR .= "Failed to add recipient '$recipient'\n";
       $SMTP_ERROR .= "SMTP error: '".$error->getMessage()."'\n";
       return FALSE;
       }
     }



and all of a sudden the problem is gone for the users.

Is my pear install broken? Does PEAR::isError() have a problem with
$SMTP_CONN->rcptTo() somehow?



Robin


Reply via email to