diff --git a/api/src/Framework.php b/api/src/Framework.php index 6088cf7fbb..d36ab2d673 100644 --- a/api/src/Framework.php +++ b/api/src/Framework.php @@ -251,6 +251,9 @@ abstract class Framework extends Framework\Extra // commit session (if existing), to fix timing problems sometimes preventing session creation ("Your session can not be verified") if (isset($GLOBALS['egw']->session)) $GLOBALS['egw']->session->commit_session(); + // run egw destructor now explicit, in case a (notification) email is send via Egw::on_shutdown(), + // as stream-wrappers used by Horde Smtp fail when PHP is already in destruction + $GLOBALS['egw']->__destruct(); exit; } diff --git a/api/src/Framework/Extra.php b/api/src/Framework/Extra.php index 16fe3c5e16..80053cf0c4 100644 --- a/api/src/Framework/Extra.php +++ b/api/src/Framework/Extra.php @@ -128,6 +128,8 @@ abstract class Extra { $GLOBALS['egw']->framework->render('', false, false); } + // run egw destructor now explicit, in case a (notification) email is send via Egw::on_shutdown(), + // as stream-wrappers used by Horde Smtp fail when PHP is already in destruction $GLOBALS['egw']->__destruct(); exit; }