diff --git a/api/src/Storage/Merge.php b/api/src/Storage/Merge.php index 831f4acf71..cb4a5e102b 100644 --- a/api/src/Storage/Merge.php +++ b/api/src/Storage/Merge.php @@ -2040,6 +2040,10 @@ abstract class Merge } Api\Header\Content::type($header['name'], $header['mime'], $header['filesize']); readfile($result); + + // 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; }