<?php
/** 
* EVP - Email Campaign Scheduler
* Should Add It In Cron Job
* Set Cronjob based on per Hours or Minutes to run this, On each run assigned SMTP limits of email will send out.
* eg: curl https://yourdomain.com/functions/tasks/scheduler.campaign.php?hash=GENERATED_CODE
**/

require_once('../../config.php');

if(isset($_GET['hash']) && ($_GET['hash'] == $tasker_hash)){
	
$log->system_debug('Campaign Scheduler Start!');

	if($email_campaigns == 'true') {
		global $s_path;
		$sendmail = new SendMail;
		$sendmail->campaign_email();
	} else {
		exit();
	}

} else {
	 header("location: ../members/login.php");
	 exit();
}