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

        $orderLang = (int) (isset($order->oxorder__oxlang->value) ? $order->oxorder__oxlang->value : 0);

        // shop info
        $shop = $this->_getShop($orderLang);

        //set mail params (from, fromName, smtp)
        $this->_setMailParams($shop);

        //create messages
        $lang = \OxidEsales\Eshop\Core\Registry::getLang();
        $smarty = $this->_getSmarty();
        $this->setViewData("order", $order);
        $this->setViewData("shopTemplateDir", $myConfig->getTemplateDir(false));

        if ($myConfig->getConfigParam('bl_perfLoadReviews', false)) {
            $this->setViewData("blShowReviewLink", true);
            $user = oxNew(\OxidEsales\Eshop\Application\Model\User::class);
            $this->setViewData("reviewuserhash", $user->getReviewUserHash($order->oxorder__oxuserid->value));
        } else {
            $this->setViewData("blShowReviewLink", false);
        }

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

        // #1469 - we need to patch security here as we do not use standard template dir, so smarty stops working
        $store['INCLUDE_ANY'] = $smarty->security_settings['INCLUDE_ANY'];
        //V send email in order language
        $oldTplLang = $lang->getTplLanguage();
        $oldBaseLang = $lang->getBaseLanguage();
        $lang->setTplLanguage($orderLang);
        $lang->setBaseLanguage($orderLang);

        $smarty->security_settings['INCLUDE_ANY'] = true;
        // force non admin to get correct paths (tpl, img)
        $myConfig->setAdminMode(false);
        $this->setBody($smarty->fetch($this->_sSenedNowTemplate));
        $this->setAltBody($smarty->fetch($this->_sSenedNowTemplatePlain));
        $myConfig->setAdminMode(true);
        $lang->setTplLanguage($oldTplLang);
        $lang->setBaseLanguage($oldBaseLang);
        // set it back
        $smarty->security_settings['INCLUDE_ANY'] = $store['INCLUDE_ANY'];

        //Sets subject to email
        $this->setSubject(($subject !== null) ? $subject : $shop->oxshops__oxsendednowsubject->getRawValue());

        $fullName = $order->oxorder__oxbillfname->getRawValue() . " " . $order->oxorder__oxbilllname->getRawValue();

        $this->setRecipient($order->oxorder__oxbillemail->value, $fullName);
        $this->setReplyTo($shop->oxshops__oxorderemail->value, $shop->oxshops__oxname->getRawValue());

        return $this->send();
    }
public function sendSendedNowMail($order, $subject = null)
    {
        $myConfig = Registry::getConfig();

        $orderLang = (int) (isset($order->oxorder__oxlang->value) ? $order->oxorder__oxlang->value : 0);

        // shop info
        $shop = $this->_getShop($orderLang);

        //set mail params (from, fromName, smtp)
        $this->_setMailParams($shop);

        //create messages
        $lang = \OxidEsales\Eshop\Core\Registry::getLang();
        $smarty = $this->_getSmarty();
        $this->setViewData("order", $order);
        $this->setViewData("shopTemplateDir", $myConfig->getTemplateDir(false));

        if ($myConfig->getConfigParam('bl_perfLoadReviews', false)) {
            $this->setViewData("blShowReviewLink", true);
            $user = oxNew(\OxidEsales\Eshop\Application\Model\User::class);
            $this->setViewData("reviewuserhash", $user->getReviewUserHash($order->oxorder__oxuserid->value));
        } else {
            $this->setViewData("blShowReviewLink", false);
        }

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

        // #1469 - we need to patch security here as we do not use standard template dir, so smarty stops working
        $store['INCLUDE_ANY'] = $smarty->security_settings['INCLUDE_ANY'];
        //V send email in order language
        $oldTplLang = $lang->getTplLanguage();
        $oldBaseLang = $lang->getBaseLanguage();
        $lang->setTplLanguage($orderLang);
        $lang->setBaseLanguage($orderLang);

        $smarty->security_settings['INCLUDE_ANY'] = true;
        // force non admin to get correct paths (tpl, img)
        $myConfig->setAdminMode(false);
        $this->setBody($smarty->fetch($this->_sSenedNowTemplate));
        $this->setAltBody($smarty->fetch($this->_sSenedNowTemplatePlain));
        $myConfig->setAdminMode(true);
        $lang->setTplLanguage($oldTplLang);
        $lang->setBaseLanguage($oldBaseLang);
        // set it back
        $smarty->security_settings['INCLUDE_ANY'] = $store['INCLUDE_ANY'];

        //Sets subject to email
        $this->setSubject(($subject !== null) ? $subject : $shop->oxshops__oxsendednowsubject->getRawValue());

        $fullName = $order->oxorder__oxbillfname->getRawValue() . " " . $order->oxorder__oxbilllname->getRawValue();

        $this->setRecipient($order->oxorder__oxbillemail->value, $fullName);
        $this->setReplyTo($shop->oxshops__oxorderemail->value, $shop->oxshops__oxname->getRawValue());

        return $this->send();
    }
public function sendSendedNowMail ( $ order , $ subject = null ) { $ myConfig = Registry :: getConfig ( ) ; $ orderLang = ( int ) ( isset ( $ order -> oxorder__oxlang -> value ) ? $ order -> oxorder__oxlang -> value : 0 ) ; // shop info $ shop = $ this -> _getShop ( $ orderLang ) ; //set mail params (from, fromName, smtp) $ this -> _setMailParams ( $ shop ) ; //create messages $ lang = \ OxidEsales \ Eshop \ Core \ Registry :: getLang ( ) ; $ smarty = $ this -> _getSmarty ( ) ; $ this -> setViewData ( "order" , $ order ) ; $ this -> setViewData ( "shopTemplateDir" , $ myConfig -> getTemplateDir ( false ) ) ; if ( $ myConfig -> getConfigParam ( 'bl_perfLoadReviews' , false ) ) { $ this -> setViewData ( "blShowReviewLink" , true ) ; $ user = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ User :: class ) ; $ this -> setViewData ( "reviewuserhash" , $ user -> getReviewUserHash ( $ order -> oxorder__oxuserid -> value ) ) ; } else { $ this -> setViewData ( "blShowReviewLink" , false ) ; } // Process view data array through oxoutput processor $ this -> _processViewArray ( ) ; // #1469 - we need to patch security here as we do not use standard template dir, so smarty stops working $ store [ 'INCLUDE_ANY' ] = $ smarty -> security_settings [ 'INCLUDE_ANY' ] ; //V send email in order language $ oldTplLang = $ lang -> getTplLanguage ( ) ; $ oldBaseLang = $ lang -> getBaseLanguage ( ) ; $ lang -> setTplLanguage ( $ orderLang ) ; $ lang -> setBaseLanguage ( $ orderLang ) ; $ smarty -> security_settings [ 'INCLUDE_ANY' ] = true ; // force non admin to get correct paths (tpl, img) $ myConfig -> setAdminMode ( false ) ; $ this -> setBody ( $ smarty -> fetch ( $ this -> _sSenedNowTemplate ) ) ; $ this -> setAltBody ( $ smarty -> fetch ( $ this -> _sSenedNowTemplatePlain ) ) ; $ myConfig -> setAdminMode ( true ) ; $ lang -> setTplLanguage ( $ oldTplLang ) ; $ lang -> setBaseLanguage ( $ oldBaseLang ) ; // set it back $ smarty -> security_settings [ 'INCLUDE_ANY' ] = $ store [ 'INCLUDE_ANY' ] ; //Sets subject to email $ this -> setSubject ( ( $ subject !== null ) ? $ subject : $ shop -> oxshops__oxsendednowsubject -> getRawValue ( ) ) ; $ fullName = $ order -> oxorder__oxbillfname -> getRawValue ( ) . " " . $ order -> oxorder__oxbilllname -> getRawValue ( ) ; $ this -> setRecipient ( $ order -> oxorder__oxbillemail -> value , $ fullName ) ; $ this -> setReplyTo ( $ shop -> oxshops__oxorderemail -> value , $ shop -> oxshops__oxname -> getRawValue ( ) ) ; return $ this -> send ( ) ; }
Sets mailer additional settings and sends "SendedNowMail" mail to user.
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 SendedNowMail mail to user . Returns true on success .