source/Core/Email.php
public function sendOrderEmailToOwner($order, $subject = null)
    {
        $config = Registry::getConfig();

        $shop = $this->_getShop();

        // cleanup
        $this->_clearMailer();

        // add user defined stuff if there is any
        $order = $this->_addUserInfoOrderEMail($order);

        $user = $order->getOrderUser();
        $this->setUser($user);

        // send confirmation to shop owner
        // send not pretending from order user, as different email domain rise spam filters
        $this->setFrom($shop->oxshops__oxowneremail->value);

        $language = \OxidEsales\Eshop\Core\Registry::getLang();
        $orderLanguage = $language->getObjectTplLanguage();

        // if running shop language is different from admin lang. set in config
        // we have to load shop in config language
        if ($shop->getLanguage() != $orderLanguage) {
            $shop = $this->_getShop($orderLanguage);
        }

        $this->setSmtp($shop);

        // create messages
        $smarty = $this->_getSmarty();
        $this->setViewData("order", $order);

        // Process view data array through oxoutput processor
        $this->_processViewArray();

        $this->setBody($smarty->fetch($config->getTemplatePath($this->_sOrderOwnerTemplate, false)));
        $this->setAltBody($smarty->fetch($config->getTemplatePath($this->_sOrderOwnerPlainTemplate, false)));

        //Sets subject to email
        // #586A
        if ($subject === null) {
            if ($smarty->template_exists($this->_sOrderOwnerSubjectTemplate)) {
                $subject = $smarty->fetch($this->_sOrderOwnerSubjectTemplate);
            } else {
                $subject = $shop->oxshops__oxordersubject->getRawValue() . " (#" . $order->oxorder__oxordernr->value . ")";
            }
        }

        $this->setSubject($subject);
        $this->setRecipient($shop->oxshops__oxowneremail->value, $language->translateString("order"));

        if ($user->oxuser__oxusername->value != "admin") {
            $fullName = $user->oxuser__oxfname->getRawValue() . " " . $user->oxuser__oxlname->getRawValue();
            $this->setReplyTo($user->oxuser__oxusername->value, $fullName);
        }

        $result = $this->send();

        $this->onOrderEmailToOwnerSent($user, $order);

        if ($config->getConfigParam('iDebug') == 6) {
            \OxidEsales\Eshop\Core\Registry::getUtils()->showMessageAndExit("");
        }

        return $result;
    }
public function sendOrderEmailToOwner($order, $subject = null)
    {
        $config = Registry::getConfig();

        $shop = $this->_getShop();

        // cleanup
        $this->_clearMailer();

        // add user defined stuff if there is any
        $order = $this->_addUserInfoOrderEMail($order);

        $user = $order->getOrderUser();
        $this->setUser($user);

        // send confirmation to shop owner
        // send not pretending from order user, as different email domain rise spam filters
        $this->setFrom($shop->oxshops__oxowneremail->value);

        $language = \OxidEsales\Eshop\Core\Registry::getLang();
        $orderLanguage = $language->getObjectTplLanguage();

        // if running shop language is different from admin lang. set in config
        // we have to load shop in config language
        if ($shop->getLanguage() != $orderLanguage) {
            $shop = $this->_getShop($orderLanguage);
        }

        $this->setSmtp($shop);

        // create messages
        $smarty = $this->_getSmarty();
        $this->setViewData("order", $order);

        // Process view data array through oxoutput processor
        $this->_processViewArray();

        $this->setBody($smarty->fetch($config->getTemplatePath($this->_sOrderOwnerTemplate, false)));
        $this->setAltBody($smarty->fetch($config->getTemplatePath($this->_sOrderOwnerPlainTemplate, false)));

        //Sets subject to email
        // #586A
        if ($subject === null) {
            if ($smarty->template_exists($this->_sOrderOwnerSubjectTemplate)) {
                $subject = $smarty->fetch($this->_sOrderOwnerSubjectTemplate);
            } else {
                $subject = $shop->oxshops__oxordersubject->getRawValue() . " (#" . $order->oxorder__oxordernr->value . ")";
            }
        }

        $this->setSubject($subject);
        $this->setRecipient($shop->oxshops__oxowneremail->value, $language->translateString("order"));

        if ($user->oxuser__oxusername->value != "admin") {
            $fullName = $user->oxuser__oxfname->getRawValue() . " " . $user->oxuser__oxlname->getRawValue();
            $this->setReplyTo($user->oxuser__oxusername->value, $fullName);
        }

        $result = $this->send();

        $this->onOrderEmailToOwnerSent($user, $order);

        if ($config->getConfigParam('iDebug') == 6) {
            \OxidEsales\Eshop\Core\Registry::getUtils()->showMessageAndExit("");
        }

        return $result;
    }
public function sendOrderEmailToOwner ( $ order , $ subject = null ) { $ config = Registry :: getConfig ( ) ; $ shop = $ this -> _getShop ( ) ; // cleanup $ this -> _clearMailer ( ) ; // add user defined stuff if there is any $ order = $ this -> _addUserInfoOrderEMail ( $ order ) ; $ user = $ order -> getOrderUser ( ) ; $ this -> setUser ( $ user ) ; // send confirmation to shop owner // send not pretending from order user, as different email domain rise spam filters $ this -> setFrom ( $ shop -> oxshops__oxowneremail -> value ) ; $ language = \ OxidEsales \ Eshop \ Core \ Registry :: getLang ( ) ; $ orderLanguage = $ language -> getObjectTplLanguage ( ) ; // if running shop language is different from admin lang. set in config // we have to load shop in config language if ( $ shop -> getLanguage ( ) != $ orderLanguage ) { $ shop = $ this -> _getShop ( $ orderLanguage ) ; } $ this -> setSmtp ( $ shop ) ; // create messages $ smarty = $ this -> _getSmarty ( ) ; $ this -> setViewData ( "order" , $ order ) ; // Process view data array through oxoutput processor $ this -> _processViewArray ( ) ; $ this -> setBody ( $ smarty -> fetch ( $ config -> getTemplatePath ( $ this -> _sOrderOwnerTemplate , false ) ) ) ; $ this -> setAltBody ( $ smarty -> fetch ( $ config -> getTemplatePath ( $ this -> _sOrderOwnerPlainTemplate , false ) ) ) ; //Sets subject to email // #586A if ( $ subject === null ) { if ( $ smarty -> template_exists ( $ this -> _sOrderOwnerSubjectTemplate ) ) { $ subject = $ smarty -> fetch ( $ this -> _sOrderOwnerSubjectTemplate ) ; } else { $ subject = $ shop -> oxshops__oxordersubject -> getRawValue ( ) . " (#" . $ order -> oxorder__oxordernr -> value . ")" ; } } $ this -> setSubject ( $ subject ) ; $ this -> setRecipient ( $ shop -> oxshops__oxowneremail -> value , $ language -> translateString ( "order" ) ) ; if ( $ user -> oxuser__oxusername -> value != "admin" ) { $ fullName = $ user -> oxuser__oxfname -> getRawValue ( ) . " " . $ user -> oxuser__oxlname -> getRawValue ( ) ; $ this -> setReplyTo ( $ user -> oxuser__oxusername -> value , $ fullName ) ; } $ result = $ this -> send ( ) ; $ this -> onOrderEmailToOwnerSent ( $ user , $ order ) ; if ( $ config -> getConfigParam ( 'iDebug' ) == 6 ) { \ OxidEsales \ Eshop \ Core \ Registry :: getUtils ( ) -> showMessageAndExit ( "" ) ; } return $ result ; }
Sets mailer additional settings and sends ordering mail to shop owner.
Returns true on success.

@param \OxidEsales\Eshop\Application\Model\Order $order   Order object
@param string                                    $subject user defined subject [optional]

@return bool
Sets mailer additional settings and sends ordering mail to shop owner . Returns true on success .