From: Tyler A. <fi...@us...> - 2001-04-25 17:18:54
|
Update of /cvsroot/squirrelmail/squirrelmail/functions In directory usw-pr-cvs1:/tmp/cvs-serv30432 Modified Files: smtp.php Log Message: * Since we do an address book lookup for nicknames, might as well add @$domain at the end of an address if there is no '@' symbol anywhere Index: smtp.php =================================================================== RCS file: /cvsroot/squirrelmail/squirrelmail/functions/smtp.php,v retrieving revision 1.111 retrieving revision 1.112 diff -u -w -r1.111 -r1.112 --- smtp.php 2001/04/23 13:59:59 1.111 +++ smtp.php 2001/04/25 17:18:51 1.112 @@ -39,7 +39,11 @@ // looks up aliases in the addressbook and expands them to // the full address. + // Adds @$domain if it wasn't in the address book and if it + // doesn't have an @ symbol in it function expandAddrs ($array) { + global $domain; + $abook = addressbook_init(); for ($i=0; $i < count($array); $i++) { $result = $abook->lookup($array[$i]); @@ -54,6 +58,10 @@ else { $array[$i] = '<' . $array[$i] . '>'; + } + + if (strpos($array[$i], '@') === false) { + $array[$i] .= '@' . $domain; } } return $array; |