source/Core/Email.php
public function sendPricealarmToCustomer($recipient, $alarm, $body = null, $returnMailBody = null)
    {
        $this->_clearMailer();

        $shop = $this->_getShop();

        if ($shop->getId() != $alarm->oxpricealarm__oxshopid->value) {
            $shop = oxNew(\OxidEsales\Eshop\Application\Model\Shop::class);
            $shop->load($alarm->oxpricealarm__oxshopid->value);
            $this->setShop($shop);
        }

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

        // create messages
        $smarty = $this->_getSmarty();

        $this->setViewData("product", $alarm->getArticle());
        $this->setViewData("oPriceAlarm", $alarm);
        $this->setViewData("bidprice", $alarm->getFProposedPrice());
        $this->setViewData("currency", $alarm->getPriceAlarmCurrency());

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

        $this->setRecipient($recipient, $recipient);
        $this->setSubject($shop->oxshops__oxname->value);

        if ($body === null) {
            $body = $smarty->fetch($this->_sPricealamrCustomerTemplate);
        }

        $this->setBody($body);

        $this->addAddress($recipient, $recipient);
        $this->setReplyTo($shop->oxshops__oxorderemail->value, $shop->oxshops__oxname->getRawValue());

        if ($returnMailBody) {
            return $this->getBody();
        } else {
            return $this->send();
        }
    }
public function sendPricealarmToCustomer($recipient, $alarm, $body = null, $returnMailBody = null)
    {
        $this->_clearMailer();

        $shop = $this->_getShop();

        if ($shop->getId() != $alarm->oxpricealarm__oxshopid->value) {
            $shop = oxNew(\OxidEsales\Eshop\Application\Model\Shop::class);
            $shop->load($alarm->oxpricealarm__oxshopid->value);
            $this->setShop($shop);
        }

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

        // create messages
        $smarty = $this->_getSmarty();

        $this->setViewData("product", $alarm->getArticle());
        $this->setViewData("oPriceAlarm", $alarm);
        $this->setViewData("bidprice", $alarm->getFProposedPrice());
        $this->setViewData("currency", $alarm->getPriceAlarmCurrency());

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

        $this->setRecipient($recipient, $recipient);
        $this->setSubject($shop->oxshops__oxname->value);

        if ($body === null) {
            $body = $smarty->fetch($this->_sPricealamrCustomerTemplate);
        }

        $this->setBody($body);

        $this->addAddress($recipient, $recipient);
        $this->setReplyTo($shop->oxshops__oxorderemail->value, $shop->oxshops__oxname->getRawValue());

        if ($returnMailBody) {
            return $this->getBody();
        } else {
            return $this->send();
        }
    }
public function sendPricealarmToCustomer ( $ recipient , $ alarm , $ body = null , $ returnMailBody = null ) { $ this -> _clearMailer ( ) ; $ shop = $ this -> _getShop ( ) ; if ( $ shop -> getId ( ) != $ alarm -> oxpricealarm__oxshopid -> value ) { $ shop = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ Shop :: class ) ; $ shop -> load ( $ alarm -> oxpricealarm__oxshopid -> value ) ; $ this -> setShop ( $ shop ) ; } //set mail params (from, fromName, smtp) $ this -> _setMailParams ( $ shop ) ; // create messages $ smarty = $ this -> _getSmarty ( ) ; $ this -> setViewData ( "product" , $ alarm -> getArticle ( ) ) ; $ this -> setViewData ( "oPriceAlarm" , $ alarm ) ; $ this -> setViewData ( "bidprice" , $ alarm -> getFProposedPrice ( ) ) ; $ this -> setViewData ( "currency" , $ alarm -> getPriceAlarmCurrency ( ) ) ; // Process view data array through oxoutput processor $ this -> _processViewArray ( ) ; $ this -> setRecipient ( $ recipient , $ recipient ) ; $ this -> setSubject ( $ shop -> oxshops__oxname -> value ) ; if ( $ body === null ) { $ body = $ smarty -> fetch ( $ this -> _sPricealamrCustomerTemplate ) ; } $ this -> setBody ( $ body ) ; $ this -> addAddress ( $ recipient , $ recipient ) ; $ this -> setReplyTo ( $ shop -> oxshops__oxorderemail -> value , $ shop -> oxshops__oxname -> getRawValue ( ) ) ; if ( $ returnMailBody ) { return $ this -> getBody ( ) ; } else { return $ this -> send ( ) ; } }
Sends price alarm to customer.
Returns true on success.

@param string                                         $recipient      email
@param \OxidEsales\Eshop\Application\Model\PriceAlarm $alarm          oxPriceAlarm object
@param string                                         $body           optional mail body
@param bool                                           $returnMailBody returns mail body instead of sending

@return bool
Sends price alarm to customer . Returns true on success .