move the hook before send to a more efficient location
authorstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 10 Jun 2003 13:36:07 +0000 (13:36 +0000)
committerstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 10 Jun 2003 13:36:07 +0000 (13:36 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4992 7612ce4b-ef26-0410-bec9-ea0150e637f0

src/compose.php

index ac9ee3fb3c0591f961f06113cb8f10357c5277d8..ca4ee2342fabe91d0bdd086aa07d81fbddcf2eb0 100644 (file)
@@ -369,7 +369,7 @@ if ($send) {
            
         }
         $body = $newBody;
-        do_hook('compose_send');
+        
         $composeMessage=$compose_messages[$session];
 
         $Result = deliverMessage($composeMessage);
@@ -1431,6 +1431,10 @@ function deliverMessage($composeMessage, $draft=false) {
         
     $rfc822_header->content_type = $content_type;
     $composeMessage->rfc822_header = $rfc822_header;
+    
+    /* Here you can modify the message structure just before we hand 
+       it over to deliver */
+    do_hook('compose_send');
 
     if (!$useSendmail && !$draft) {
         require_once(SM_PATH . 'class/deliver/Deliver_SMTP.class.php');