isSMTP();
$phpmailer->Host = $smtp_host;
$phpmailer->Port = $smtp_port;
$phpmailer->SMTPAuth = true;
$phpmailer->SMTPSecure = $smtp_secure;
$phpmailer->Username = $smtp_user;
$phpmailer->Password = $smtp_pass;
$phpmailer->From = $smtp_user;
$phpmailer->FromName = $sender_name;
});
// Send emails in batches
$batch_size = intval($_POST[‘batch_size’] ?? 20);
$delay = intval($_POST[‘delay’] ?? 1);
$results = [‘success’ => [], ‘failed’ => []];
$batches = array_chunk($valid_recipients, $batch_size);
$total_batches = count($batches);
for ($i = 0; $i < $total_batches; $i++) {
$batch = $batches[$i];
foreach ($batch as $recipient) {
$headers = [
'Content-Type: text/html; charset=UTF-8',
"From: $sender_name <$sender_email>”
];
$sent = wp_mail($recipient, $subject, $body, $headers);
if ($sent) {
$results[‘success’][] = $recipient;
} else {
$results[‘failed’][] = $recipient;
}
}
// Delay between batches (if not last batch)
if ($i < $total_batches - 1 && $delay > 0) {
sleep($delay);
}
}
echo json_encode([
‘success’ => true,
‘total’ => count($valid_recipients),
‘sent’ => count($results[‘success’]),
‘failed’ => count($results[‘failed’]),
‘results’ => $results
]);
} catch (Exception $e) {
echo json_encode([
‘success’ => false,
‘error’ => $e->getMessage()
]);
}
exit;
}
get_header();
?>
๐ง Email Blaster Pro Gmail SMTP ยท Real Sending
๐ Campaign Status
Ready
โก Today’s Sends
0
๐ Recipients List
0 emails
โ๏ธ Email Content
๐ Click to attach files (PDF, images, documents)
๐ Gmail SMTP Settings
Get from: myaccount.google.com/apppasswords
๐จ 0/0
โ
0
โ 0
0% complete
๐ข System initialized. Configure Gmail SMTP to start.
๐ Tip: Use Gmail App Password (not your regular password)