示例#1
0
 /**
  * Mailing List Email Count Task
  *
  * @return  void
  */
 public function emailCountTask()
 {
     // get the mailing list
     $mailinglistId = Request::getInt('mailinglistid', '-1');
     // get list of emails
     $newsletterMailinglist = new MailList($this->database);
     $filters = array('status' => 'active');
     $emails = array_keys($newsletterMailinglist->getListEmails($mailinglistId, 'email', $filters));
     // echo count of emails
     echo json_encode($emails);
 }
示例#2
0
 /**
  * Resend Newsletter Confirmation
  * 
  * @return [type] [description]
  */
 public function resendConfirmationTask()
 {
     //get request vars
     $mid = Request::getInt('mid', 0);
     //instantiate mailing list object
     $newsletterMailinglist = new MailList($this->database);
     $newsletterMailinglist->load($mid);
     //send confirmation email
     Helper::sendMailinglistConfirmationEmail(User::get('email'), $newsletterMailinglist, false);
     //inform user and redirect
     App::redirect(Route::url('index.php?option=com_newsletter&task=subscribe'), Lang::txt('COM_NEWSLETTER_MAILINGLISTS_CONFIRM_SENT', User::get('email')));
     return;
 }