Skip to content

Instantly share code, notes, and snippets.

@SmetDenis
Created March 10, 2016 18:51
Show Gist options
  • Save SmetDenis/3f6868fdc4aff6cd18fb to your computer and use it in GitHub Desktop.
Save SmetDenis/3f6868fdc4aff6cd18fb to your computer and use it in GitHub Desktop.
<?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