CoreFiles by mySites.guru
sendtestmail.php43 lines, 988 bytes, from Joomla_3.5.0-beta2-Beta-Full_Package.zip
Raw History Compare with 3.5.0-beta
md5
de6dcb6d7af673880618b2ba9090f078
sha1
bd375ba2e2210d68f2a181c303b9643bd8ca157c
sha256
57b4248c5e5bc40bd3e99c9588f2f971999a948b23c107d2859d67d2446d3a43
<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_config
 *
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
defined('_JEXEC') or die;

/**
 * Send Test Mail Controller from global configuration
 *
 * @since  3.5
 */
class ConfigControllerApplicationSendtestmail extends JControllerBase
{
	/**
	 * Method to send the test mail.
	 *
	 * @return  string
	 *
	 * @since   3.5
	 */
	public function execute()
	{
		if (!JSession::checkToken('get'))
		{
			$this->app->enqueueMessage(JText::_('JINVALID_TOKEN'));
			$this->app->redirect('index.php');
		}

		if (!JFactory::getUser()->authorise('core.admin'))
		{
			$this->app->enqueueMessage(JText::_('JERROR_ALERTNOAUTHOR'));
			$this->app->redirect('index.php');
		}

		$model = new ConfigModelApplication;
		echo new JResponseJson($model->sendTestMail());
		JFactory::getApplication()->close();
	}
}

No other release has this exact content. See every version of this file.