Absenderadresse austauschen

Hallo Oxid-Team,

was muss ich in der Methode sendOrderEmailToOwner ändern, damit als Absenderadresse die E-Mail von Shop Administrator steht und nicht die Kunden-E-Mail?

public function sendOrderEmailToOwner( $oOrder, $sSubject = null )
    {
        $myConfig = $this->getConfig();

        $oShop = $this->_getShop();

        // cleanup
        $this->_clearMailer();

        // add user defined stuff if there is any
        $oOrder = $this->_addUserInfoOrderEMail( $oOrder );

        // send confirmation to shop owner
        $sFullName = $oOrder->getOrderUser()->oxuser__oxfname->getRawValue() . " " . $oOrder->getOrderUser()->oxuser__oxlname->getRawValue();
        $this->setFrom( $oOrder->getOrderUser()->oxuser__oxusername->value, $sFullName );

        $oLang = oxLang::getInstance();
        $iOrderLang = $oLang->getObjectTplLanguage();

        // if running shop language is different from admin lang. set in config
        // we have to load shop in config language
        if ( $oShop->getLanguage() != $iOrderLang ) {
            $oShop = $this->_getShop( $iOrderLang );
        }

        $this->setSmtp( $oShop );

        // create messages
        $oSmarty = $this->_getSmarty();
        $oSmarty->assign( "charset", $oLang->translateString("charset"));
        $oSmarty->assign( "order", $oOrder );
        $oSmarty->assign( "shop", $oShop );
        $oSmarty->assign( "oViewConf", $oShop );
        $oSmarty->assign( "oView", $myConfig->getActiveView() );
        $oSmarty->assign( "user", $oOrder->getOrderUser() );
        $oSmarty->assign( "currency", $myConfig->getActShopCurrencyObject() );
        $oSmarty->assign( "basket", $oOrder->getBasket() );
        $oSmarty->assign( "payment", $oOrder->getPayment() );

        //deprecated var
        $oSmarty->assign( "iswishlist", true);

        if( $oOrder->getVoucherList() )
            $oSmarty->assign( "vouchers", $oOrder->getVoucherList() );

        $oOutputProcessor = oxNew( "oxoutput" );
        $aNewSmartyArray = $oOutputProcessor->processViewArray($oSmarty->get_template_vars(), "oxemail");
        foreach ($aNewSmartyArray as $key => $val)
            $oSmarty->assign( $key, $val );

        $this->setBody( $oSmarty->fetch( $myConfig->getTemplatePath( $this->_sOrderOwnerTemplate, false ) ) );
        $this->setAltBody( $oSmarty->fetch( $myConfig->getTemplatePath( $this->_sOrderOwnerPlainTemplate, false ) ) );

        //Sets subject to email
        // #586A
        if ( $sSubject === null ) {
            if ( $oSmarty->template_exists( $this->_sOrderOwnerSubjectTemplate) ) {
                $sSubject = $oSmarty->fetch( $this->_sOrderOwnerSubjectTemplate );
            } else {
                 $sSubject = $oShop->oxshops__oxordersubject->getRawValue()." (#".$oOrder->oxorder__oxordernr->value.")";
            }
        }

        $this->setSubject( $sSubject );
        $this->setRecipient( $oShop->oxshops__oxowneremail->value, $oLang->translateString("order") );

        if ( $oOrder->getOrderUser()->oxuser__oxusername->value != "admin" )
            $this->setReplyTo( $oOrder->getOrderUser()->oxuser__oxusername->value, $sFullName );

        $blSuccess = $this->send();

        // add user history
        $oRemark = oxNew( "oxremark" );
        $oRemark->oxremark__oxtext      = new oxField($this->getAltBody(), oxField::T_RAW);
        $oRemark->oxremark__oxparentid  = new oxField($oOrder->getOrderUser()->getId(), oxField::T_RAW);
        $oRemark->oxremark__oxtype      = new oxField("o", oxField::T_RAW);
        $oRemark->save();


        if ( $myConfig->getConfigParam( 'iDebug' ) == 6) {
            oxUtils::getInstance()->showMessageAndExit( "" );
        }

        return $blSuccess;
    }

Danke!

Reicht es aus, diese Zeile auszutauschen?

Jetzt:

$this->setReplyTo( $oOrder->getOrderUser()->oxuser__oxusername->value, $sFullName );

Neu:

$this->setReplyTo($oShop->oxshops__oxowneremail->value, $sFullName );

Habe bereits gefunden. Das ist die richtige Zeile:

$this->setFrom( $oShop->oxshops__oxowneremail->value, $oShop->oxshops__oxname->getRawValue() );