src/ShopWishlistBundle/objects/db/TPkgShopWishlist.class.php
public function SendPerMail($sToMail, $sToName, $sComment)
    {
        $bSendSuccess = false;
        $oOwner = $this->GetFieldDataExtranetUser();
        $oMail = TdbDataMailProfile::GetProfile('SendWishlist');
        $aMailData = array('to_name' => $sToName, 'to_mail' => $sToMail, 'comment' => $sComment, 'sWishlistURL' => $this->GetPublicLink());
        $oMail->AddDataArray($aMailData);
        $aUserData = $oOwner->GetObjectPropertiesAsArray();
        $oMail->AddDataArray($aUserData);
        $oMail->ChangeFromAddress($oOwner->GetUserEMail(), $oOwner->fieldFirstname.' '.$oOwner->fieldLastname);
        $oMail->ChangeToAddress($sToMail, $sToName);
        if ($oMail->SendUsingObjectView('emails', 'Customer')) {
            $bSendSuccess = true;
            $oHistory = TdbPkgShopWishlistMailHistory::GetNewInstance();
            /** @var $oHistory TdbPkgShopWishlistMailHistory */
            $aData = array('to_name' => $sToName, 'to_email' => $sToMail, 'comment' => $sComment, 'datesend' => date('Y-m-d H:i:s'), 'pkg_shop_wishlist_id' => $this->id);
            $oHistory->LoadFromRow($aData);
            $oHistory->AllowEditByAll(true);
            $oHistory->Save();
        }

        return $bSendSuccess;
    }
public function SendPerMail($sToMail, $sToName, $sComment)
    {
        $bSendSuccess = false;
        $oOwner = $this->GetFieldDataExtranetUser();
        $oMail = TdbDataMailProfile::GetProfile('SendWishlist');
        $aMailData = array('to_name' => $sToName, 'to_mail' => $sToMail, 'comment' => $sComment, 'sWishlistURL' => $this->GetPublicLink());
        $oMail->AddDataArray($aMailData);
        $aUserData = $oOwner->GetObjectPropertiesAsArray();
        $oMail->AddDataArray($aUserData);
        $oMail->ChangeFromAddress($oOwner->GetUserEMail(), $oOwner->fieldFirstname.' '.$oOwner->fieldLastname);
        $oMail->ChangeToAddress($sToMail, $sToName);
        if ($oMail->SendUsingObjectView('emails', 'Customer')) {
            $bSendSuccess = true;
            $oHistory = TdbPkgShopWishlistMailHistory::GetNewInstance();
            /** @var $oHistory TdbPkgShopWishlistMailHistory */
            $aData = array('to_name' => $sToName, 'to_email' => $sToMail, 'comment' => $sComment, 'datesend' => date('Y-m-d H:i:s'), 'pkg_shop_wishlist_id' => $this->id);
            $oHistory->LoadFromRow($aData);
            $oHistory->AllowEditByAll(true);
            $oHistory->Save();
        }

        return $bSendSuccess;
    }
public function SendPerMail ( $ sToMail , $ sToName , $ sComment ) { $ bSendSuccess = false ; $ oOwner = $ this -> GetFieldDataExtranetUser ( ) ; $ oMail = TdbDataMailProfile :: GetProfile ( 'SendWishlist' ) ; $ aMailData = array ( 'to_name' => $ sToName , 'to_mail' => $ sToMail , 'comment' => $ sComment , 'sWishlistURL' => $ this -> GetPublicLink ( ) ) ; $ oMail -> AddDataArray ( $ aMailData ) ; $ aUserData = $ oOwner -> GetObjectPropertiesAsArray ( ) ; $ oMail -> AddDataArray ( $ aUserData ) ; $ oMail -> ChangeFromAddress ( $ oOwner -> GetUserEMail ( ) , $ oOwner -> fieldFirstname . ' ' . $ oOwner -> fieldLastname ) ; $ oMail -> ChangeToAddress ( $ sToMail , $ sToName ) ; if ( $ oMail -> SendUsingObjectView ( 'emails' , 'Customer' ) ) { $ bSendSuccess = true ; $ oHistory = TdbPkgShopWishlistMailHistory :: GetNewInstance ( ) ; /** @var $oHistory TdbPkgShopWishlistMailHistory */ $ aData = array ( 'to_name' => $ sToName , 'to_email' => $ sToMail , 'comment' => $ sComment , 'datesend' => date ( 'Y-m-d H:i:s' ) , 'pkg_shop_wishlist_id' => $ this -> id ) ; $ oHistory -> LoadFromRow ( $ aData ) ; $ oHistory -> AllowEditByAll ( true ) ; $ oHistory -> Save ( ) ; } return $ bSendSuccess ; }
send the wishlist per mail to a user.

@param string $sToMail
@param string $sToName
@param string $sComment

@return bool
send the wishlist per mail to a user .