source/Core/Email.php
public function sendOrderEmailToUser($order, $subject = null)
    {
        // add user defined stuff if there is any
        $order = $this->_addUserInfoOrderEMail($order);

        $shop = $this->_getShop();
        $this->_setMailParams($shop);

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

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

        $this->setViewData("blShowReviewLink", $this->shouldProductReviewLinksBeIncluded());

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

        $this->setBody($smarty->fetch($this->_sOrderUserTemplate));
        $this->setAltBody($smarty->fetch($this->_sOrderUserPlainTemplate));

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

        $this->setSubject($subject);

        $fullName = $user->oxuser__oxfname->getRawValue() . " " . $user->oxuser__oxlname->getRawValue();

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

        return $this->send();
    }
public function sendOrderEmailToUser($order, $subject = null)
    {
        // add user defined stuff if there is any
        $order = $this->_addUserInfoOrderEMail($order);

        $shop = $this->_getShop();
        $this->_setMailParams($shop);

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

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

        $this->setViewData("blShowReviewLink", $this->shouldProductReviewLinksBeIncluded());

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

        $this->setBody($smarty->fetch($this->_sOrderUserTemplate));
        $this->setAltBody($smarty->fetch($this->_sOrderUserPlainTemplate));

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

        $this->setSubject($subject);

        $fullName = $user->oxuser__oxfname->getRawValue() . " " . $user->oxuser__oxlname->getRawValue();

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

        return $this->send();
    }
public function sendOrderEmailToUser ( $ order , $ subject = null ) { // add user defined stuff if there is any $ order = $ this -> _addUserInfoOrderEMail ( $ order ) ; $ shop = $ this -> _getShop ( ) ; $ this -> _setMailParams ( $ shop ) ; $ user = $ order -> getOrderUser ( ) ; $ this -> setUser ( $ user ) ; // create messages $ smarty = $ this -> _getSmarty ( ) ; $ this -> setViewData ( "order" , $ order ) ; $ this -> setViewData ( "blShowReviewLink" , $ this -> shouldProductReviewLinksBeIncluded ( ) ) ; // Process view data array through oxOutput processor $ this -> _processViewArray ( ) ; $ this -> setBody ( $ smarty -> fetch ( $ this -> _sOrderUserTemplate ) ) ; $ this -> setAltBody ( $ smarty -> fetch ( $ this -> _sOrderUserPlainTemplate ) ) ; // #586A if ( $ subject === null ) { if ( $ smarty -> template_exists ( $ this -> _sOrderUserSubjectTemplate ) ) { $ subject = $ smarty -> fetch ( $ this -> _sOrderUserSubjectTemplate ) ; } else { $ subject = $ shop -> oxshops__oxordersubject -> getRawValue ( ) . " (#" . $ order -> oxorder__oxordernr -> value . ")" ; } } $ this -> setSubject ( $ subject ) ; $ fullName = $ user -> oxuser__oxfname -> getRawValue ( ) . " " . $ user -> oxuser__oxlname -> getRawValue ( ) ; $ this -> setRecipient ( $ user -> oxuser__oxusername -> value , $ fullName ) ; $ this -> setReplyTo ( $ shop -> oxshops__oxorderemail -> value , $ shop -> oxshops__oxname -> getRawValue ( ) ) ; return $ this -> send ( ) ; }
Sets mailer additional settings and sends ordering 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 ordering mail to user . Returns true on success .