source/Core/Email.php
protected function onOrderEmailToOwnerSent($user, $order)
    {
        // add user history
        $remark = oxNew(\OxidEsales\Eshop\Application\Model\Remark::class);
        $remark->oxremark__oxtext = new \OxidEsales\Eshop\Core\Field($this->getAltBody(), \OxidEsales\Eshop\Core\Field::T_RAW);
        $remark->oxremark__oxparentid = new \OxidEsales\Eshop\Core\Field($user->getId(), \OxidEsales\Eshop\Core\Field::T_RAW);
        $remark->oxremark__oxtype = new \OxidEsales\Eshop\Core\Field("o", \OxidEsales\Eshop\Core\Field::T_RAW);
        $remark->save();
    }
protected function onOrderEmailToOwnerSent($user, $order)
    {
        // add user history
        $remark = oxNew(\OxidEsales\Eshop\Application\Model\Remark::class);
        $remark->oxremark__oxtext = new \OxidEsales\Eshop\Core\Field($this->getAltBody(), \OxidEsales\Eshop\Core\Field::T_RAW);
        $remark->oxremark__oxparentid = new \OxidEsales\Eshop\Core\Field($user->getId(), \OxidEsales\Eshop\Core\Field::T_RAW);
        $remark->oxremark__oxtype = new \OxidEsales\Eshop\Core\Field("o", \OxidEsales\Eshop\Core\Field::T_RAW);
        $remark->save();
    }
protected function onOrderEmailToOwnerSent ( $ user , $ order ) { // add user history $ remark = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ Remark :: class ) ; $ remark -> oxremark__oxtext = new \ OxidEsales \ Eshop \ Core \ Field ( $ this -> getAltBody ( ) , \ OxidEsales \ Eshop \ Core \ Field :: T_RAW ) ; $ remark -> oxremark__oxparentid = new \ OxidEsales \ Eshop \ Core \ Field ( $ user -> getId ( ) , \ OxidEsales \ Eshop \ Core \ Field :: T_RAW ) ; $ remark -> oxremark__oxtype = new \ OxidEsales \ Eshop \ Core \ Field ( "o" , \ OxidEsales \ Eshop \ Core \ Field :: T_RAW ) ; $ remark -> save ( ) ; }
Method is called when order email is sent to owner.

@param \OxidEsales\Eshop\Application\Model\User  $user
@param \OxidEsales\Eshop\Application\Model\Order $order
Method is called when order email is sent to owner .