added callback function argument to parseAdrress to lookup nicks against the
authorstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 27 Dec 2002 12:26:48 +0000 (12:26 +0000)
committerstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 27 Dec 2002 12:26:48 +0000 (12:26 +0000)
addressbook

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4314 7612ce4b-ef26-0410-bec9-ea0150e637f0

src/compose.php

index 83e111e..2a2db00 100644 (file)
@@ -28,6 +28,7 @@ require_once(SM_PATH . 'functions/mime.php');
 require_once(SM_PATH . 'functions/plugin.php');
 require_once(SM_PATH . 'functions/display_messages.php');
 require_once(SM_PATH . 'class/deliver/Deliver.class.php');
+require_once(SM_PATH . 'functions/addressbook.php');
 
 /* --------------------- Get globals ------------------------------------- */
 $username = $_SESSION['username'];
@@ -1245,9 +1246,12 @@ function deliverMessage($composeMessage, $draft=false) {
     global $imapServerAddress, $imapPort, $sent_folder, $key;
 
     $rfc822_header = $composeMessage->rfc822_header;
-    $rfc822_header->to = $rfc822_header->parseAddress($send_to,true, array(), '', $domain);
-    $rfc822_header->cc = $rfc822_header->parseAddress($send_to_cc,true,array(), '',$domain);
-    $rfc822_header->bcc = $rfc822_header->parseAddress($send_to_bcc,true, array(), '',$domain);
+
+    $abook = addressbook_init(false, true);
+    
+    $rfc822_header->to = $rfc822_header->parseAddress($send_to,true, array(), '', $domain, array(&$abook,'lookup'));
+    $rfc822_header->cc = $rfc822_header->parseAddress($send_to_cc,true,array(), '',$domain, array(&$abook,'lookup'));
+    $rfc822_header->bcc = $rfc822_header->parseAddress($send_to_bcc,true, array(), '',$domain, array(&$abook,'lookup'));
     $rfc822_header->priority = $mailprio;
     $rfc822_header->subject = $subject;
     $special_encoding='';