I was hoping that I could add multiple email recipients on a Frontpage form submission (normal, not secure, etc). The form handler only accepts one email address.

Any clues?

Thanks

Dani AI

Generated

The replies from and show a simple, no-code fix; for readers who need a programmatic alternative (more control, CC/BCC, per-user routing or better deliverability), here are practical, safe options you can implement on the server.

A minimal PHP approach (server-side) sends to multiple recipients by providing a comma-separated list and using headers for Reply-To or Bcc. Validate and never trust user input for any header fields.

<?php
// validate user-supplied reply address
$reply = filter_var($_POST['email'], FILTER_VALIDATE_EMAIL) ? $_POST['email'] : null;

// server-side recipient list (do not accept raw recipient lists from users)
$to = 'alice@example.com, bob@example.com';
$subject = 'Contact form';
$message = "Message from form:\n" . strip_tags($_POST['message']);

$headers = "From: no-reply@example.com\r\n";
if ($reply) $headers .= "Reply-To: $reply\r\n";
$headers .= "Bcc: auditor@example.com\r\n";

mail($to, $subject, $message, $headers);
?>

Checklist and cautions

  • Keep the list of recipients on the server, not in form fields.
  • Validate emails with filter_var() and strip CR/LF to prevent header injection (see OWASP guidance).
  • For reliability use an SMTP library (PHPMailer, etc.) instead of raw mail(); authenticated SMTP reduces spam flags.
  • Use Bcc for privacy when emailing many recipients and log sends for troubleshooting.

Further reading and tools

These server-side patterns give control over CC/BCC, per-message routing, and logging—useful when the simple host-side alias or group approach used earlier is not desirable.

Recommended Answers

All 3 Replies

I'm sorry this went unanswered, I hoped someone else would chime in. Without server-side coding, the only suggestion I have is to setup a mail group in your mail server. Your form submits to one email address, and your mail server then distributes to the group.

I'm sorry this went unanswered, I hoped someone else would chime in. Without server-side coding, the only suggestion I have is to setup a mail group in your mail server. Your form submits to one email address, and your mail server then distributes to the group.

Thanks for this response, and actually I did get one reply that suggested putting one form inside of another...but I had already realized that I simply needed to create an alias email address and then distribiuted that alias to multiple emails through my web host.

I am gald that you thought of it too. It was obviously simple, works perfectly and requires no coding at all...very cool.

Thanks again, and you could discontinue this thread if you can do that...

No problem! We'll leave the thread, that's the beauty of forums. You never know who else has the same problem and might find the answer here.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.