I have a php email script here but it will only take one email. How can i set this up to take multiple emails say upto 500? if i were to enter them as such.... email1@aol.com, email2@aol.com, email3@aol.com
ect sperated by commas?
From Address: <input type="text" id="from" value="fakeemailer@albertyw.mit.edu" size="40"><br>
Recipient Address: <input type="text" id="to" size="40"><br>
Subject: <input type="text" id="subject" size="40"><br>
Message: <br><textarea id="message" cols="50" rows="10"></textarea><br>
<input type="submit" onclick="javascript:sendmail()" value="SEND">
$headers = $_POST['headers'];
$from = $_POST['from'];
$to = $_POST['to'];
$subject = $_POST['subject'];
$message = $_POST['message'];
$headers .="From: $from";
mail($to, $subject, $message, $headers) or die("EMAIL FAIL");
echo $to."<br-->";
echo $subject."<br>";
echo $message."<br>";
echo $headers."<br>";
echo 'EMAIL SENT';
Exactly as you put it in your question. Commas separate multiple recipients.
Mail() in the PHP manual is a good place to start.
try this
<input type="text" id="to" value="fakeemailer@albertyw.mit.edu, email2, email3, email4" name="to">