source/Core/ShopControl.php
protected function sendOfflineWarning(\OxidEsales\Eshop\Core\Exception\StandardException $exception)
    {
        $result = false;
        /** @var  $emailAddress Email address to sent the message to */
        $emailAddress = Registry::get(\OxidEsales\Eshop\Core\ConfigFile::class)->getVar('sAdminEmail');

        if ($emailAddress) {
            /** As we are inside the exception handling process, any further exceptions must be caught */
            $failedShop = isset($_REQUEST['shp']) ? addslashes($_REQUEST['shp']) : 'Base shop';

            $date = date(DATE_RFC822); // RFC 822 (example: Mon, 15 Aug 05 15:52:01 +0000)
            $script = $_SERVER['SCRIPT_NAME'] . '?' . $_SERVER['QUERY_STRING'];
            $referrer = $_SERVER['HTTP_REFERER'];

            //sending a message to admin
            $emailSubject = 'Offline warning!';
            $emailBody = "
                Database connection error in OXID eShop:
                Date: {$date}
                Shop: {$failedShop}

                mysql error: " . $exception->getMessage() . "
                mysql error no: " . $exception->getCode() . "

                Script: {$script}
                Referrer: {$referrer}";

            $mailer = new PHPMailer();
            $mailer->isMail();

            $mailer->setFrom($emailAddress);
            $mailer->addAddress($emailAddress);
            $mailer->Subject = $emailSubject;
            $mailer->Body = $emailBody;
            /** Set the priority of the message
             * For most clients expecting the Priority header:
             * 1 = High, 2 = Medium, 3 = Low
             * */
            $mailer->Priority = 1;
            /** MS Outlook custom header */
            $mailer->addCustomHeader("X-MSMail-Priority: Urgent");
            /** Set the Importance header: */
            $mailer->addCustomHeader("Importance: High");

            $result = $mailer->send();
        }

        return $result;
    }
protected function sendOfflineWarning(\OxidEsales\Eshop\Core\Exception\StandardException $exception)
    {
        $result = false;
        /** @var  $emailAddress Email address to sent the message to */
        $emailAddress = Registry::get(\OxidEsales\Eshop\Core\ConfigFile::class)->getVar('sAdminEmail');

        if ($emailAddress) {
            /** As we are inside the exception handling process, any further exceptions must be caught */
            $failedShop = isset($_REQUEST['shp']) ? addslashes($_REQUEST['shp']) : 'Base shop';

            $date = date(DATE_RFC822); // RFC 822 (example: Mon, 15 Aug 05 15:52:01 +0000)
            $script = $_SERVER['SCRIPT_NAME'] . '?' . $_SERVER['QUERY_STRING'];
            $referrer = $_SERVER['HTTP_REFERER'];

            //sending a message to admin
            $emailSubject = 'Offline warning!';
            $emailBody = "
                Database connection error in OXID eShop:
                Date: {$date}
                Shop: {$failedShop}

                mysql error: " . $exception->getMessage() . "
                mysql error no: " . $exception->getCode() . "

                Script: {$script}
                Referrer: {$referrer}";

            $mailer = new PHPMailer();
            $mailer->isMail();

            $mailer->setFrom($emailAddress);
            $mailer->addAddress($emailAddress);
            $mailer->Subject = $emailSubject;
            $mailer->Body = $emailBody;
            /** Set the priority of the message
             * For most clients expecting the Priority header:
             * 1 = High, 2 = Medium, 3 = Low
             * */
            $mailer->Priority = 1;
            /** MS Outlook custom header */
            $mailer->addCustomHeader("X-MSMail-Priority: Urgent");
            /** Set the Importance header: */
            $mailer->addCustomHeader("Importance: High");

            $result = $mailer->send();
        }

        return $result;
    }
protected function sendOfflineWarning ( \ OxidEsales \ Eshop \ Core \ Exception \ StandardException $ exception ) { $ result = false ; /** @var  $emailAddress Email address to sent the message to */ $ emailAddress = Registry :: get ( \ OxidEsales \ Eshop \ Core \ ConfigFile :: class ) -> getVar ( 'sAdminEmail' ) ; if ( $ emailAddress ) { /** As we are inside the exception handling process, any further exceptions must be caught */ $ failedShop = isset ( $ _REQUEST [ 'shp' ] ) ? addslashes ( $ _REQUEST [ 'shp' ] ) : 'Base shop' ; $ date = date ( DATE_RFC822 ) ; // RFC 822 (example: Mon, 15 Aug 05 15:52:01 +0000) $ script = $ _SERVER [ 'SCRIPT_NAME' ] . '?' . $ _SERVER [ 'QUERY_STRING' ] ; $ referrer = $ _SERVER [ 'HTTP_REFERER' ] ; //sending a message to admin $ emailSubject = 'Offline warning!' ; $ emailBody = "
                Database connection error in OXID eShop:
                Date: {$date}
                Shop: {$failedShop}

                mysql error: " . $ exception -> getMessage ( ) . "
                mysql error no: " . $ exception -> getCode ( ) . "

                Script: {$script}
                Referrer: {$referrer}" ; $ mailer = new PHPMailer ( ) ; $ mailer -> isMail ( ) ; $ mailer -> setFrom ( $ emailAddress ) ; $ mailer -> addAddress ( $ emailAddress ) ; $ mailer -> Subject = $ emailSubject ; $ mailer -> Body = $ emailBody ; /** Set the priority of the message
             * For most clients expecting the Priority header:
             * 1 = High, 2 = Medium, 3 = Low
             * */ $ mailer -> Priority = 1 ; /** MS Outlook custom header */ $ mailer -> addCustomHeader ( "X-MSMail-Priority: Urgent" ) ; /** Set the Importance header: */ $ mailer -> addCustomHeader ( "Importance: High" ) ; $ result = $ mailer -> send ( ) ; } return $ result ; }
Send an offline warning to the shop owner.
Currently an email is sent to the email address configured as 'sAdminEmail' in the eShop config file.

This method forms part of the exception handling process. Any further exceptions must be caught.

@param StandardException $exception

@return bool Returns true, if the email was sent.
Send an offline warning to the shop owner . Currently an email is sent to the email address configured as sAdminEmail in the eShop config file .