[imp] INVALID_ADDRESS - solution

Didi Rieder adrieder@sbox.tugraz.at
Thu, 22 Mar 2001 20:48:05 +0100


--On Thursday, March 22, 2001 03:00:11 PM +0100 Michael Redinger 
<Michael.Redinger@uibk.ac.at> wrote:
>
> INVALID_ADDRESS@.SYNTAX-ERROR.
> UNEXPECTED_DATA_AFTER_ADDRESS@.SYNTAX-ERROR.
> MISSING_MAILBOX_TERMINATOR@.SYNTAX-ERROR.
>
>
>
> The solution seems to be very obvious and even better for the user.
> Just add one line (the one marked with "^^^^^" below) to horde.lib:
>
>
>         if (is_array($rcpt_arr) && count($rcpt_arr) > 0) {
>                 $ob = $rcpt_arr[0];
>                 $recipients = $ob->mailbox . '@' . $ob->host;
>                 for ($i=1; $i<count($rcpt_arr); $i++) {
>                         $ob = $rcpt_arr[$i];
>                         if( $ob->host == ".SYNTAX-ERROR.") return false;
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>                         $recipients .= ' ' . $ob->mailbox . '@' .
> $ob->host;                 }
>         }
>

To show the user, that an error occoured, I changed your solution to this 
one:

if( $ob->host == ".SYNTAX-ERROR.") {
  print '<script language=JavaScript>
	  alert("Please check your recipients");
	</script>';
	return false;
}


~regards
	Didi

-- 
-------------------------
Didi Rieder
adrieder@sbox.tugraz.at
-------------------------