Smarty instance getter, assigns this oxEmail instance to "oEmailView" variable

@return \Smarty
432465
protected function _getSmarty()
    {
        if ($this->_oSmarty === null) {
            $this->_oSmarty = \OxidEsales\Eshop\Core\Registry::getUtilsView()->getSmarty();
        }

        //setting default view
        $this->_oSmarty->assign("oEmailView", $this);

        return $this->_oSmarty;
    }
1224334
public function getView()
	{
		if( !isset( $this->view ) ) {
			throw new \Aimeos\Client\Html\Exception( sprintf( 'No view available' ) );
		}

		return $this->view;
	}
218026
public function getFormView(): FormView
    {
        if (!$this->formView) {
            $this->formView = $this->getForm()->createView();
        }

        return $this->formView;
    }
927160
public function setObject(\Smarty $object = null)
    {
        $this->object = $object ? $object : new \Smarty();

        return $this;
    }
1121016
public function getMailInstance($config = null)
    {
        if (!$config) {
            $config = $this->config('config');
        }

        $sender = Configure::read('CM.Mail.sender');

        $object = $this->EmailObject;

        $object->sender($sender['email'], $sender['name']);

        if (Configure::read('CM.Mail.transport')) {
            $object->transport(Configure::read('CM.Mail.transport'));
        }

        return $object;
    }
499995
public function getByEmail(string $email)
	{
		return $this->setAuthorizer($this->getModel()->where('email', '=', $email)->first());
	}
539210
public static function getInstance() {

		if( !isset( self::$instance ) ) {

			self::$instance	= new MailProperties();

			self::$instance->init( CoreGlobal::CONFIG_MAIL );
		}

		return self::$instance;
	}
1103961
public function getUser()
    {
        if ($this->user === false) {
            $this->user = UserModel::findByEmail($this->email);
        }

        return $this->user;
    }
385102
public function getSmarty()
    {
        if (empty($this->smarty)) {
            $this->smarty = StMarksSmarty::getSmarty();
            $this->smarty->prependTemplateDir(realpath(__DIR__ . '/../templates'), __CLASS__);
            $this->smarty->setFramed(true);
        }
        return $this->smarty;
    }
747319
public function setFromToDefaultFrom() {
        $from = self::getDefaultFrom();
        if($from === null) {
            // require_once 'Zend/Mail/Exception.php';
            throw new Zend_Mail_Exception(
                'No default From Address set to use');
        }

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

        return $this;
    }
191269
public function getView()
    {
        if (!$this->_view instanceof LibBaseViewAbstract) {
            //Make sure we have a view identifier
            if (!($this->_view instanceof AnServiceIdentifier)) {
                $this->setView($this->_view);
            }

            $this->_view = $this->getService($this->_view);
        }

        return $this->_view;
    }
934335
public function get() {

		$v =& self::$_lPoolDataChange[$this->_sConfig][$this->_mID];

		if (!is_array($v)) {

			$o = $this->_coll();

			$aOrig = $o->findOne([static::$_mKey => $this->_mID]) ?: FALSE;

			$bNeedInit = !is_array($aOrig);
			if (!$bNeedInit) {
				unset($aOrig[static::$_mKey]);
			}

			self::$_lPoolData[$this->_sConfig][$this->_mID] = $aOrig;

			if ($bNeedInit) {
				$v = $this->_init();
			} else {
				$v = $aOrig;
			}

			$v = $this->_format($v);
		}

		return $v;
	}
180667
private function sendUsingPHP ()
    {

        // Construct Headers

        $headers	= $this->constructHeaders ();

        // Get template resource

        $tpl	= \Sonic\Sonic::getResource ('tpl');

        // Set smarty template status

        $smarty	= $tpl instanceof \Smarty;

        // If we have a smarty template object

        if ($smarty)
        {

            // Get caching status

            $smartyPrevCache	= $tpl->caching;

            // Disable caching

            $tpl->setCaching (FALSE);

        }

        // For each recipient

        foreach ($this->_recipients as $recipient)
        {

            // Send email

            try
            {

                // Check to make sure the recipients email address is valid

                Parser::_validateEmail ($recipient['email']);

                // Set recipient

                if (isset($recipient['name'])) {
                    $recipientTo = $recipient['name'] . '<' . $recipient['email'] . '>';
                } else {
                    $recipientTo = $recipient['email'];
                }

                // Add recipient header to original headers

                $emailHeaders	= $headers . 'To: ' . $recipientTo . $this->_nl;

                // If we're using smarty

                if ($smarty)
                {

                    // Clear variables

                    $tpl->clearAllAssign ();

                    // Assign variables

                    $tpl->assign ('recipient', $recipient);

                    // Fetch

                    $emailMessage	= $tpl->fetch ('string:' . $this->_message);

                }

                // Else we're not using smarty

                else
                {

                    // Just leave the message as it is

                    $emailMessage	= $this->_message;

                }

                // Send Message

                if (!mail ($recipientTo, $this->_subject, $emailMessage, $emailHeaders))
                {

                    // Add error and return FALSE

                    new \Sonic\Message ('error', 'Cannot send message to: ' . $recipient['email']);

                    // return FALSE

                    return FALSE;

                }

                if (is_callable($this->_callbackMethod))
                {
                    call_user_func ($this->_callbackMethod, $this->_subject, $recipientTo, $this->_fromAddress, $emailMessage);
                }


                // If we're logging the email

                if ($this->logFlag)
                {

                    // Log

                    $this->Log ($recipient['email'], $emailHeaders, $emailMessage, 'phpmail');

                }

            }

                // Else the email address is not valid

            catch (Parser\Exception $e)
            {

                // Add error

                new \Sonic\Message ('error', 'Invalid recipient email address: ' . $recipient['email']);

                // Skip to next recipient

                continue;

            }

        }

        // If we're using smarty

        if ($smarty)
        {

            // Set caching status

            $tpl->caching	= $smartyPrevCache;

        }

        // Return TRUE

        return TRUE;

    }
868567
protected function getMailer()
    {
        $transport = null;
        if ($this->configurationManager->getSetting('mailer.type') === 'sendmail') {
            $transport = \Swift_SendmailTransport::newInstance($this->configurationManager->getSetting('mailer.sendmailCommand'));
        } else if ($this->configurationManager->getSetting('mailer.type') === 'smtp') {
            $host = $this->configurationManager->getSetting('mailer.smtpHost');
            $port = $this->configurationManager->getSetting('mailer.smtpPort');
            $username = $this->configurationManager->getSetting('mailer.smtpUsername');
            $password = $this->configurationManager->getSetting('mailer.smtpPassword');
            
            $transport = \Swift_SmtpTransport::newInstance($host, $port);
            $transport->setUsername($username);
            $transport->setPassword($password);
        }
        
        if ($transport === null) {
            throw new Exception('No mail transport defined. Please check your configuration.');
        }

        return \Swift_Mailer::newInstance($transport);
    }
879393
public function getEmail() : ?string 
    {
        if ( ! $this->hasEmail()) {
            $this->setEmail($this->getDefaultEmail());
        }
        return $this->email;
    }
666054
public function getViewEngine()
    {
        if($this->app->exists(ViewEngineInterface::class)) {
            return $this->app->get(ViewEngineInterface::class);
        }
        $view = View::forge($this->web->view_dir);
        $this->app->set(ViewEngineInterface::class, $view, true);
        return $view;
    }
224854
public function getSMTPObject()
    {
        if ($this->_smtp) {
            return $this->_smtp;
        }

        $this->_smtp = new Net_SMTP(
            $this->_params['host'],
            $this->_params['port'],
            $this->_params['localhost']
        );

        /* Set pipelining. */
        if ($this->_params['pipelining']) {
            $this->_smtp->pipelining = true;
        }

        /* If we still don't have an SMTP object at this point, fail. */
        if (!($this->_smtp instanceof Net_SMTP)) {
            throw new Horde_Mail_Exception('Failed to create a Net_SMTP object', self::ERROR_CREATE);
        }

        /* Configure the SMTP connection. */
        if ($this->_params['debug']) {
            $this->_smtp->setDebug(true);
        }

        /* Attempt to connect to the configured SMTP server. */
        $res = $this->_smtp->connect($this->_params['timeout']);
        if ($res instanceof PEAR_Error) {
            $this->_error('Failed to connect to ' . $this->_params['host'] . ':' . $this->_params['port'], $res, self::ERROR_CONNECT);
        }

        /* Attempt to authenticate if authentication has been enabled. */
        if ($this->_params['auth']) {
            $method = is_string($this->_params['auth'])
                ? $this->_params['auth']
                : '';

            $res = $this->_smtp->auth($this->_params['username'], $this->_params['password'], $method);
            if ($res instanceof PEAR_Error) {
                $this->_error("$method authentication failure", $res, self::ERROR_AUTH);
            }
        }

        return $this->_smtp;
    }