Index: Headers.php
===================================================================
RCS file: imp/lib/MIME/Headers.php,v
retrieving revision 1.2
diff -u -r1.2 Headers.php
--- Headers.php	10 Nov 2005 14:47:44 -0000	1.2
+++ Headers.php	6 Dec 2005 12:20:52 -0000
@@ -143,6 +143,22 @@
                 }
             }
         }
+        
+        /* Add custom headers via hook */
+        if (!empty($GLOBALS['conf']['hooks']['header'])) {
+            require_once HORDE_BASE . '/config/hooks.php';
+            if (function_exists('_imp_hook_header')) {
+                $headers = call_user_func('_imp_hook_header');
+                
+                if(is_array($headers)) {
+                    foreach ($headers as $key => $val) {
+                        $this->addHeader(trim($key), trim($val));
+                    }
+                    
+                }
+            }
+        }
+
     }
 
     /**
