public function getMailer()
    {
        if ($this->isTestMode) {
            $className = \Tx_Oelib_EmailCollector::class;
        } else {
            $className = \Tx_Oelib_RealMailer::class;
        }

        if (!is_object($this->mailer) || (get_class($this->mailer) !== $className)) {
            $this->mailer = GeneralUtility::makeInstance($className);
        }

        return $this->mailer;
    }
public function getMailer()
    {
        if ($this->isTestMode) {
            $className = \Tx_Oelib_EmailCollector::class;
        } else {
            $className = \Tx_Oelib_RealMailer::class;
        }

        if (!is_object($this->mailer) || (get_class($this->mailer) !== $className)) {
            $this->mailer = GeneralUtility::makeInstance($className);
        }

        return $this->mailer;
    }
public function getMailer ( ) { if ( $ this -> isTestMode ) { $ className = \ Tx_Oelib_EmailCollector :: class ; } else { $ className = \ Tx_Oelib_RealMailer :: class ; } if ( ! is_object ( $ this -> mailer ) || ( get_class ( $ this -> mailer ) !== $ className ) ) { $ this -> mailer = GeneralUtility :: makeInstance ( $ className ) ; } return $ this -> mailer ; }
Retrieves the singleton mailer instance. Depending on the mode, this
instance is either an e-mail collector or a real mailer.

@return \Tx_Oelib_AbstractMailer|\Tx_Oelib_RealMailer|\Tx_Oelib_EmailCollector the singleton mailer object
Retrieves the singleton mailer instance . Depending on the mode this instance is either an e - mail collector or a real mailer .