diff --git a/core/trunk/core/class/class_core_tools.php b/core/trunk/core/class/class_core_tools.php
index 3c9decb63393f060c52fc49cb0b5a9d7c097545a..60c83f8e39468295ed28e2c543d90c213682e028 100644
--- a/core/trunk/core/class/class_core_tools.php
+++ b/core/trunk/core/class/class_core_tools.php
@@ -1419,11 +1419,18 @@ class core_tools extends functions
                 require_once('apps'.DIRECTORY_SEPARATOR.$_SESSION['config']['app_id'].DIRECTORY_SEPARATOR."class".DIRECTORY_SEPARATOR."class_business_app_tools.php");
                 $app = new business_app_tools();
                 $path = $app->insert_app_page($this->f_page);
-                if((!$path || empty($path)) && !file_exists($_SESSION['config']['corepath'].'custom'.DIRECTORY_SEPARATOR.$_SESSION['custom_override_id'].DIRECTORY_SEPARATOR.$path) && !file_exists($_SESSION['config']['corepath'].$path)) {
+                if(
+                    (!$path || empty($path)) 
+                    && !file_exists($_SESSION['config']['corepath'].'custom'.DIRECTORY_SEPARATOR.$_SESSION['custom_override_id'].DIRECTORY_SEPARATOR.$path) 
+                    && !file_exists($path)) {
                     //require($_SESSION["config"]["defaultPage"].".php");
                     $this->loadDefaultPage();
                 } else {
-                    require($path);
+                    if (!file_exists($path)) {
+                        $this->loadDefaultPage();
+                    } else {
+                        require($path);
+                    }
                 }
             }
         }
diff --git a/core/trunk/core/xml/actions_pages.xml b/core/trunk/core/xml/actions_pages.xml
index 8ea228609274362a7f80f4b1769075625119b3f8..4111cdd9424eb004ec9f088ee6f65166a85cff1e 100644
--- a/core/trunk/core/xml/actions_pages.xml
+++ b/core/trunk/core/xml/actions_pages.xml
@@ -292,4 +292,15 @@ An action page is described in a ACTIONPAGE tag :
             <COLL_ID>business_coll</COLL_ID>
         </COLLECTIONS>
     </ACTIONPAGE>
+    <ACTIONPAGE>
+        <ID>close_mail_and_index</ID>
+        <LABEL>_CLOSE_MAIL_AND_INDEX</LABEL>
+        <NAME>close_mail_and_index</NAME>
+        <ORIGIN>apps</ORIGIN>
+        <MODULE></MODULE>
+        <FLAG_CREATE>false</FLAG_CREATE>
+        <COLLECTIONS>
+            <COLL_ID>letterbox_coll</COLL_ID>
+        </COLLECTIONS>
+    </ACTIONPAGE>
 </ROOT>