Plugins can now change messages again
authorullgren <ullgren@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 10 Jul 2003 19:27:55 +0000 (19:27 +0000)
committerullgren <ullgren@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 10 Jul 2003 19:27:55 +0000 (19:27 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@5259 7612ce4b-ef26-0410-bec9-ea0150e637f0

src/compose.php

index e1c67a644f10388bdff4b76f50db8d87ac5d2ea2..339c278b0a9e8a676477d177960f419bece52e39 100644 (file)
@@ -1395,7 +1395,11 @@ function deliverMessage($composeMessage, $draft=false) {
 
     /* Here you can modify the message structure just before we hand 
        it over to deliver */
-    do_hook('compose_send');
+    $hookReturn = do_hook('compose_send', $composeMessage);
+    /* Get any changes made by plugins to $composeMessage. */
+    if ( is_object($hookReturn[1]) ) {
+        $composeMessage = $hookReturn[1];
+    }
 
     if (!$useSendmail && !$draft) {
         require_once(SM_PATH . 'class/deliver/Deliver_SMTP.class.php');