我正在使用与我不久前在这里提出的另一个问题相关的简单 php 邮件程序脚本。
<?php
//print_r($_POST);
if(isset($_POST['_save'])) {
$name = $_POST['name'];
$email = $_POST['email'];
$message = $_POST['message'];
$subject = $_POST['subject'];
if (empty($name) || empty($email) || empty($subject) || empty($message)) {
if (empty($name))
$error['name'] = "Please enter your Full Name";
if (empty($email))
$error['email'] = "Please enter a valid Email Address";
if (empty($subject))
$error['subject'] = "Please Write a Subject";
if (empty($message))
$error['message'] = "lease write a message, inquiries or other concerns above";
}
else { //if not empty
$headers="From: {$email}\r\nReply-To: {$email}"; //create headers for email
mail('email@domain.com',$subject,$message,$headers); //mail the message;
$success = "Thank you! You're email has been sent.";
#done;
}
}
?>
如何添加 2 个电子邮件地址发送到?我想让邮件发送到 2 个单独的电子邮件地址