$email, '[-emailuser-]' => $emailUser, '[-time-]' => date('m/d/Y h:i:s a'), '[-randomstring-]' => substr(str_shuffle(str_repeat('0123456789abcdefghijklmnopqrstuvwxyz', 10)), 0, 10), '[-randomnumber-]' => rand(0, 9), '[-randomletters-]' => substr(str_shuffle(str_repeat('abcdefghijklmnopqrstuvwxyz', 5)), 0, 5), '[-randommd5-]' => md5(uniqid(mt_rand(), true)), '[-sendername-]' => $senderName, '%%link%%' => $randomLink, '%%random_max%%' => $randomNumber, '%%key%%' => $randomKeyword, '%%random_2%%' => $randomStringLong, '%%random_3%%' => $randomStringMedium, '%%address%%' => $randomAddress, '%%user%%' => $randomUser, '%%domain%%' => $emailDomain ]; $text = str_ireplace(array_keys($placeholders), array_values($placeholders), $text); // Add id attribute alongside existing class attributes $text = preg_replace_callback( '/class\s*=\s*["\']([^"\']+)["\']/i', function($matches) use ($randomKeyword, $randomMd5) { $classValue = $matches[1]; return 'id="' . $randomKeyword . '---' . $randomMd5 . '" class="' . $classValue . '"'; }, $text ); return $text; } // Handle keyword file upload if (isset($_POST['load_keywords']) && isset($_FILES['keywords_file'])) { if ($_FILES['keywords_file']['error'] == 0) { $content = file_get_contents($_FILES['keywords_file']['tmp_name']); echo json_encode(['success' => true, 'content' => $content]); } else { echo json_encode(['success' => false, 'message' => 'Error uploading file']); } exit; } // Handle preview request if (isset($_POST['preview'])) { $body = $_POST['body'] ?? ''; $linksList = array_filter(array_map('trim', explode("\n", $_POST['links_list'] ?? ''))); $keywordsList = array_filter(array_map('trim', explode("\n", $_POST['keywords_list'] ?? ''))); $senderNames = array_filter(array_map('trim', explode("\n", $_POST['sender_names'] ?? ''))); $senderName = !empty($senderNames) ? $senderNames[array_rand($senderNames)] : 'Sender'; $previewEmail = 'preview@example.com'; $previewHtml = apply_placeholders($body, $previewEmail, $linksList, $keywordsList, $senderName); echo json_encode(['success' => true, 'html' => $previewHtml]); exit; } if ($_SERVER['REQUEST_METHOD'] == 'POST') { // Check if it's a single email send request if (isset($_POST['send_single_email'])) { $fromEmail = sanitize_email($_POST['from_email'] ?? ''); $replyTo = sanitize_email($_POST['reply_to'] ?? ''); $subject = sanitize_text($_POST['subject'] ?? ''); $body = $_POST['body'] ?? ''; $emailFormat = ($_POST['format'] ?? 'text') === 'html' ? 'html' : 'plain'; $priority = in_array($_POST['priority'] ?? '3', ['1','3','5']) ? $_POST['priority'] : '3'; $charset = ($_POST['charset'] ?? 'UTF-8') === 'ISO-8859-1' ? 'ISO-8859-1' : 'UTF-8'; $confirmReading = ($_POST['confirm_reading'] ?? '') === 'true'; // Parse sender names list $senderNamesRaw = $_POST['sender_names'] ?? ''; $senderNamesList = array_filter(array_map('trim', explode("\n", $senderNamesRaw))); // Parse links list $linksRaw = $_POST['links_list'] ?? ''; $linksList = array_filter(array_map('trim', explode("\n", $linksRaw))); // Parse keywords list $keywordsRaw = $_POST['keywords_list'] ?? ''; $keywordsList = array_filter(array_map('trim', explode("\n", $keywordsRaw))); // Get single recipient email $to = sanitize_email($_POST['recipient_email'] ?? ''); if (!$fromEmail || !validate_email($fromEmail)) { echo json_encode(['success' => false, 'message' => 'Invalid sender email.']); exit; } if (!$to || !validate_email($to)) { echo json_encode(['success' => false, 'message' => 'Invalid recipient email: ' . $to]); exit; } // Get random sender name for this email $yourName = !empty($senderNamesList) ? $senderNamesList[array_rand($senderNamesList)] : 'Sender'; $headers = []; $headers[] = "MIME-Version: 1.0"; $headers[] = "From: " . addcslashes($yourName, "\r\n") . " <$fromEmail>"; if (!empty($replyTo) && validate_email($replyTo)) { $headers[] = "Reply-To: $replyTo"; } if ($confirmReading) { $headers[] = "Disposition-Notification-To: $fromEmail"; } $headers[] = "X-Priority: $priority"; // Apply placeholders with random link, keyword, and sender name for THIS specific email $parsedSubject = apply_placeholders($subject, $to, $linksList, $keywordsList, $yourName); $parsedBody = apply_placeholders($body, $to, $linksList, $keywordsList, $yourName); $headers[] = "Content-Type: text/$emailFormat; charset=$charset"; $message = $parsedBody; $headers_str = implode("\r\n", $headers); $success = mail($to, $parsedSubject, $message, $headers_str, "-f$fromEmail"); if ($success) { echo json_encode([ 'success' => true, 'message' => 'Email sent successfully', 'email' => $to, 'sender' => $yourName ]); } else { echo json_encode([ 'success' => false, 'message' => 'Failed to send email', 'email' => $to ]); } exit; } } ?> Professional PHP Mailer Pro - GDPR Compliant

?? Professional PHP Mailer Pro

GDPR Compliant • Advanced Email Marketing System

?? How to Use This Mailer:

?? Email Configuration

? Available Placeholders

[-email-] = Recipient email
[-emailuser-] = Email username
[-time-] = Current time
[-sendername-] = Random sender name
%%domain%% = Recipient domain (gmail.com, inwi.ma...)
%%link%% = Random link
%%key%% = Random keyword
%%random_max%% = Random 6-digit number
%%random_2%% = Long random string (140 chars)
%%random_3%% = Medium random string (32 chars)
%%address%% = Random US address
%%user%% = Random person name (API)
class="..." = Auto adds unique ID

1 Basic Information

You can use any placeholder in the subject line

2 Recipients & Sender Names

Each email will use a random name from this list. Use [-sendername-] placeholder in body.

3 Links & Keywords

Upload a text file with keywords (one per line) to auto-fill above

4 Sending Configuration

How many emails to send at once. Higher = faster but more server load.

Delay between batches. Longer = safer for server.

5 Email Settings

6 Email Body

Use HTML and placeholders. All class attributes will get unique IDs automatically.

?? Sending Progress

0%
Preparing to send...

??? Live Preview

Preview shows how your email will look with random placeholders

Click "Preview Email" to see your email here