我在这里有一个 php 电子邮件脚本,但它只需要一封电子邮件。我如何设置它以接收多封电子邮件,最多 500 封?如果我要这样输入它们.... email1@aol.com, email2@aol.com, email3@aol.com
ect 用逗号分隔?
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';