source/Core/Email.php
public function sendSuggestMail($user, $product)
    {
        $myConfig = Registry::getConfig();

        //sets language of shop
        $currLang = $myConfig->getActiveShop()->getLanguage();

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

        //sets language to article
        if ($product->getLanguage() != $currLang) {
            $product->setLanguage($currLang);
            $product->load($product->getId());
        }

        // mailer stuff
        // send not pretending from suggesting user, as different email domain rise spam filters
        $this->setFrom($shop->oxshops__oxinfoemail->value);
        $this->setSmtp();

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

        $articleUrl = $product->getLink();

        //setting recommended user id
        if ($myConfig->getActiveView()->isActive('Invitations') && $activeUser = $shop->getUser()) {
            $articleUrl = \OxidEsales\Eshop\Core\Registry::getUtilsUrl()->appendParamSeparator($articleUrl);
            $articleUrl .= "su=" . $activeUser->getId();
        }

        $this->setViewData("sArticleUrl", $articleUrl);

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

        $this->setBody($smarty->fetch($this->_sSuggestTemplate));
        $this->setAltBody($smarty->fetch($this->_sSuggestTemplatePlain));
        $this->setSubject($user->send_subject);

        $this->setRecipient($user->rec_email, $user->rec_name);
        $this->setReplyTo($user->send_email, $user->send_name);

        return $this->send();
    }
public function sendSuggestMail($user, $product)
    {
        $myConfig = Registry::getConfig();

        //sets language of shop
        $currLang = $myConfig->getActiveShop()->getLanguage();

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

        //sets language to article
        if ($product->getLanguage() != $currLang) {
            $product->setLanguage($currLang);
            $product->load($product->getId());
        }

        // mailer stuff
        // send not pretending from suggesting user, as different email domain rise spam filters
        $this->setFrom($shop->oxshops__oxinfoemail->value);
        $this->setSmtp();

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

        $articleUrl = $product->getLink();

        //setting recommended user id
        if ($myConfig->getActiveView()->isActive('Invitations') && $activeUser = $shop->getUser()) {
            $articleUrl = \OxidEsales\Eshop\Core\Registry::getUtilsUrl()->appendParamSeparator($articleUrl);
            $articleUrl .= "su=" . $activeUser->getId();
        }

        $this->setViewData("sArticleUrl", $articleUrl);

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

        $this->setBody($smarty->fetch($this->_sSuggestTemplate));
        $this->setAltBody($smarty->fetch($this->_sSuggestTemplatePlain));
        $this->setSubject($user->send_subject);

        $this->setRecipient($user->rec_email, $user->rec_name);
        $this->setReplyTo($user->send_email, $user->send_name);

        return $this->send();
    }
public function sendSuggestMail ( $ user , $ product ) { $ myConfig = Registry :: getConfig ( ) ; //sets language of shop $ currLang = $ myConfig -> getActiveShop ( ) -> getLanguage ( ) ; // shop info $ shop = $ this -> _getShop ( $ currLang ) ; //sets language to article if ( $ product -> getLanguage ( ) != $ currLang ) { $ product -> setLanguage ( $ currLang ) ; $ product -> load ( $ product -> getId ( ) ) ; } // mailer stuff // send not pretending from suggesting user, as different email domain rise spam filters $ this -> setFrom ( $ shop -> oxshops__oxinfoemail -> value ) ; $ this -> setSmtp ( ) ; // create messages $ smarty = $ this -> _getSmarty ( ) ; $ this -> setViewData ( "product" , $ product ) ; $ this -> setUser ( $ user ) ; $ articleUrl = $ product -> getLink ( ) ; //setting recommended user id if ( $ myConfig -> getActiveView ( ) -> isActive ( 'Invitations' ) && $ activeUser = $ shop -> getUser ( ) ) { $ articleUrl = \ OxidEsales \ Eshop \ Core \ Registry :: getUtilsUrl ( ) -> appendParamSeparator ( $ articleUrl ) ; $ articleUrl .= "su=" . $ activeUser -> getId ( ) ; } $ this -> setViewData ( "sArticleUrl" , $ articleUrl ) ; // Process view data array through oxOutput processor $ this -> _processViewArray ( ) ; $ this -> setBody ( $ smarty -> fetch ( $ this -> _sSuggestTemplate ) ) ; $ this -> setAltBody ( $ smarty -> fetch ( $ this -> _sSuggestTemplatePlain ) ) ; $ this -> setSubject ( $ user -> send_subject ) ; $ this -> setRecipient ( $ user -> rec_email , $ user -> rec_name ) ; $ this -> setReplyTo ( $ user -> send_email , $ user -> send_name ) ; return $ this -> send ( ) ; }
Sets mailer additional settings and sends "SuggestMail" mail to user.
Returns true on success.

@param \OxidEsales\Eshop\Application\Model\User $user    Mailing parameters object
@param object                                   $product Product object

@return bool
Sets mailer additional settings and sends SuggestMail mail to user . Returns true on success .