getDefaultFrom example

public static function clearDefaultFrom()
    {
        self::$_defaultFrom = null;
    }

    /** * Sets From-name and -email based on the defaults * * @return Zend_Mail Provides fluent interface */
    public function setFromToDefaultFrom() {
        $from = self::getDefaultFrom();
        if($from === null) {
            throw new Zend_Mail_Exception(
                'No default From Address set to use');
        }

        $this->setFrom($from['email']$from['name']);

        return $this;
    }

    /** * Sets Default ReplyTo-address and -name of the message * * @param string $email * @param string Optional $name * @return void */
Home | Imprint | This part of the site doesn't use cookies.