✉ Mailer Control Panel

yawoa.com  •  104.238.117.204

Sender

Leave blank to use From address

Recipients

Separate multiple addresses with commas or new lines

Message

Plain text mode. Switch HTML Mode on to write <b>bold</b>, <a href>links</a>, etc.
$results = []; $errors = []; function parseEmailList($raw) { $out = []; foreach (preg_split('/[\r\n,;]+/', $raw) as $e) { $e = trim($e); if ($e !== '' && filter_var($e, FILTER_VALIDATE_EMAIL)) $out[] = $e; } return $out; } if ($_SERVER['REQUEST_METHOD'] === 'POST') { $from_name = trim(strip_tags(isset($_POST['from_name']) ? $_POST['from_name'] : 'Sender')); $from_addr = trim(strip_tags(isset($_POST['from_addr']) ? $_POST['from_addr'] : '')); if (!filter_var($from_addr, FILTER_VALIDATE_EMAIL)) $from_addr = 'no-reply@' . $domain; $subject = trim(strip_tags(isset($_POST['subject']) ? $_POST['subject'] : '')); $is_html = isset($_POST['is_html']) && $_POST['is_html'] === '1'; $body = isset($_POST['body']) ? $_POST['body'] : ''; $reply_to = trim(strip_tags(isset($_POST['reply_to']) ? $_POST['reply_to'] : $from_addr)); if (!filter_var($reply_to, FILTER_VALIDATE_EMAIL)) $reply_to = $from_addr; $to_list = parseEmailList(isset($_POST['to']) ? $_POST['to'] : ''); $cc_list = parseEmailList(isset($_POST['cc']) ? $_POST['cc'] : ''); $bcc_list = parseEmailList(isset($_POST['bcc']) ? $_POST['bcc'] : ''); if (empty($to_list)) $errors[] = 'At least one valid To address is required.'; if ($subject === '') $errors[] = 'Subject cannot be empty.'; if (trim(strip_tags($body))==='') $errors[] = 'Message body cannot be empty.'; if (empty($errors)) { // Build encoded from $from_label = '=?UTF-8?B?' . base64_encode($from_name) . '?='; // Build body/headers if ($is_html) { $boundary = 'MP_' . bin2hex(random_bytes(8)); $text_part = strip_tags(str_replace(['
','
','
','

'], ["\n","\n","\n","\n\n"], $body)); $ct = "Content-Type: multipart/alternative; boundary=\"{$boundary}\""; $msg = "--{$boundary}\r\n"; $msg .= "Content-Type: text/plain; charset=UTF-8\r\n"; $msg .= "Content-Transfer-Encoding: base64\r\n\r\n"; $msg .= chunk_split(base64_encode($text_part)); $msg .= "--{$boundary}\r\n"; $msg .= "Content-Type: text/html; charset=UTF-8\r\n"; $msg .= "Content-Transfer-Encoding: base64\r\n\r\n"; $msg .= chunk_split(base64_encode($body)); $msg .= "--{$boundary}--"; } else { $ct = "Content-Type: text/plain; charset=UTF-8\r\nContent-Transfer-Encoding: base64"; $msg = chunk_split(base64_encode($body)); } // Common headers $hdrs = "From: {$from_label} <{$from_addr}>\r\n"; $hdrs .= "Reply-To: {$reply_to}\r\n"; $hdrs .= "MIME-Version: 1.0\r\n"; $hdrs .= "{$ct}\r\n"; $hdrs .= "X-Mailer: PHP/" . phpversion() . "\r\n"; $hdrs .= "X-Origin-Server: {$domain}\r\n"; if (!empty($cc_list)) $hdrs .= "Cc: " . implode(', ', $cc_list) . "\r\n"; // Send to each To foreach ($to_list as $addr) { $ok = @mail($addr, $subject, $msg, $hdrs); $results[] = ['addr' => $addr, 'type' => 'To', 'ok' => $ok]; } // CC recipients foreach ($cc_list as $addr) { $ok = @mail($addr, $subject, $msg, $hdrs); $results[] = ['addr' => $addr, 'type' => 'Cc', 'ok' => $ok]; } // BCC recipients — individual sends, no BCC header leaked foreach ($bcc_list as $addr) { $bhdrs = $hdrs; // no CC header for privacy $ok = @mail($addr, $subject, $msg, $bhdrs); $results[] = ['addr' => $addr, 'type' => 'Bcc', 'ok' => $ok]; } } } $sent_count = count(array_filter($results, fn($r) => $r['ok'])); $fail_count = count(array_filter($results, fn($r) => !$r['ok'])); ?> Mailer Panel — yawoa.com

✉ Mailer Control Panel

yawoa.com  •  104.238.117.204

Sender

Leave blank to use From address

Recipients

Separate multiple addresses with commas or new lines

Message

Plain text mode. Switch HTML Mode on to write <b>bold</b>, <a href>links</a>, etc.