Please set Email Template before mail Sent.

send_email($ad_id,$month); } } /* * Send Bulk mails to user request condition check */ if (isset( $_POST['adrotate_email_nonce'] )&& wp_verify_nonce( $_POST['adrotate_email_nonce'], 'adrotate_email_ad_active' )) { if (isset($_POST['adrotate_action']) && $_POST['adrotate_action'] != '' && isset($_POST['bannercheck']) && isset($_POST['dsp_report_gen_month']) && $_POST['dsp_report_gen_month'] != '') { $month = $_POST['dsp_report_gen_month']; $dsp_email1 = new Ad_Rotate_Email_Addon_Send_Email(); foreach ($_POST['bannercheck'] as $ad_id) { $dsp_email1->send_email($ad_id,$month); } } } global $wpdb, $current_user, $userdata, $adrotate_config, $adrotate_debug; $now = adrotate_now(); $today = adrotate_date_start('day'); $in2days = $now + 172800; $in7days = $now + 604800; $in84days = $now + 7257600; if(isset($_GET['month']) AND isset($_GET['year'])) { $month = esc_attr($_GET['month']); $year = esc_attr($_GET['year']); } else { $month = date("m"); $year = date("Y"); } $monthstart = mktime(0, 0, 0, $month, 1, $year); $monthend = mktime(0, 0, 0, $month+1, 0, $year); ?>

get_results("SELECT `id`, `title`, `type`, `tracker`, `weight`, `cbudget`, `ibudget`, `crate`, `irate` FROM `".$wpdb->prefix."adrotate` WHERE `type` = 'active' OR `type` = 'error' OR `type` = 'expired' OR `type` = '2days' OR `type` = '7days' OR `type` = 'disabled' ORDER BY `sortorder` ASC, `id` ASC;"); $activebanners1 = $errorbanners = $disabledbanners = false; foreach($allbanners as $singlebanner) { $advertiser = ''; $starttime = $stoptime = 0; $starttime = $wpdb->get_var("SELECT `starttime` FROM `".$wpdb->prefix."adrotate_schedule` WHERE `ad` = '".$singlebanner->id."' ORDER BY `starttime` ASC LIMIT 1;"); $stoptime = $wpdb->get_var("SELECT `stoptime` FROM `".$wpdb->prefix."adrotate_schedule` WHERE `ad` = '".$singlebanner->id."' ORDER BY `stoptime` DESC LIMIT 1;"); if($adrotate_config['enable_advertisers'] == 'Y') { $user = $wpdb->get_var("SELECT `user` FROM `".$wpdb->prefix."adrotate_linkmeta` WHERE `ad` = '".$singlebanner->id."' AND `group` = '0' AND `block` = '0' LIMIT 1;"); $advertiser = $wpdb->get_var("SELECT `user_login` FROM `".$wpdb->prefix."users` WHERE `id` = '".$user."' LIMIT 1;"); } $type = $singlebanner->type; if($type == 'active' AND $stoptime <= $in7days) $type = '7days'; if($type == 'active' AND $stoptime <= $in2days) $type = '2days'; if($type == 'active' AND $stoptime <= $now) $type = 'expired'; if(($singlebanner->crate > 0 AND $singlebanner->cbudget < 1) OR ($singlebanner->irate > 0 AND $singlebanner->ibudget < 1)) $type = 'expired'; //Active ads if($type == 'active' OR $type == '7days') { $activebanners1[$singlebanner->id] = array( 'id' => $singlebanner->id, 'title' => $singlebanner->title, 'advertiser' => $advertiser, 'type' => $type, 'tracker' => $singlebanner->tracker, 'weight' => $singlebanner->weight, 'firstactive' => $starttime, 'lastactive' => $stoptime ); } } ?>


- - 0) echo '
Groups: '.$grouplist; ?> 0 AND $adrotate_config['enable_advertisers'] == 'Y') echo '
Advertiser: '.$banner['advertiser']; ?>
 
From Name : >
From Email : >
Cc : >
Reply To : >
Subject : >
Email Template : false ); ?> Note: Here {aduser} is Advertiser Name, {adimpression} is Ad Impression, {adclick} is Ad Clicks and {adreport} is daily report of the Ad.