Created
March 10, 2016 18:51
-
-
Save SmetDenis/3f6868fdc4aff6cd18fb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* JBZoo App is universal Joomla CCK, application for YooTheme Zoo component | |
* @package jbzoo | |
* @version 2.x Pro | |
* @author JBZoo App http://jbzoo.com | |
* @copyright Copyright (C) JBZoo.com, All rights reserved. | |
* @license http://jbzoo.com/license-pro.php JBZoo Licence | |
* @coder Denis Smetannikov <denis@jbzoo.com> | |
*/ | |
// no direct access | |
defined('_JEXEC') or die('Restricted access'); | |
/** | |
* Class JBTestJBUniversalController | |
*/ | |
class JBTestJBUniversalController extends JBUniversalController | |
{ | |
/** | |
* Index action | |
*/ | |
public function index() | |
{ | |
$recipients = array('admin@jbzoo.com', 'denis@jbzoo.com'); | |
foreach ($recipients as $recEmail) { | |
$mailer = JFactory::getMailer(); | |
$mailer->ClearAllRecipients(); | |
$mailer->addRecipient(array($recEmail, $recEmail)); | |
$mailer->setSubject('Test message'); | |
$mailer->setBody('Message: ' . mt_rand(1000, 9999)); | |
var_dump($mailer->send()); | |
echo '<br>'; | |
} | |
die('die'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment