From cb13511f17ef86ea7b55dde82e8d965b6e805969 Mon Sep 17 00:00:00 2001 From: fidian Date: Wed, 25 Apr 2001 17:18:51 +0000 Subject: [PATCH] * 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 git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1301 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/smtp.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/functions/smtp.php b/functions/smtp.php index af8b8845..96b5eddb 100644 --- a/functions/smtp.php +++ b/functions/smtp.php @@ -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]); @@ -55,6 +59,10 @@ { $array[$i] = '<' . $array[$i] . '>'; } + + if (strpos($array[$i], '@') === false) { + $array[$i] .= '@' . $domain; + } } return $array; } -- 2.25.1