我一直在使用这个邮件程序,但现在我需要添加(多个)永久密件抄送地址。我怎样才能做到这一点?
到目前为止,这是我的代码:
<?php
$message = '';
if (isset($_POST['email']) && !empty($_POST['email'])) {
if (mail($_POST['email'], $_POST['subject'], $_POST['body'], "From: me@mydomain")) {
$message = "Email has been sent to <b>".$_POST['email']."</b>.<br>";
} else {
$message = "Failed sending message to <b>".$_POST['email']."</b>.<br>";
}
} else {
if (isset($_POST['submit'])) {
$message = "No email address specified!<br>";
}
}
if (!empty($message)) {
$message .= "<br><br>";
}
?>