I´m testing mail() capabilities, and I have this form field named "mailList" which is a textarea witha couple of mails separated by commas.
So here´s my input form: <textarea name="listadoMails"></textarea>
And I´m trying this:
$listadoMails = $_POST["listadoMails"];
$para = 'myOwnMail@gmail.com';
$asunto = $_POST['subject'];
$mensaje = $_POST['mensaje'];
$headers = 'From: myOwnMail@mysite.com';
$headers .= 'Bcc: '.$listadoMails. "
";
$headers = 'MIME-Version: 1.0' . "
";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "
";
if($_POST['listadoMails']) {
//mando mail a los usuarios
$envioUsuarios = mail($para, $asunto, $mensaje, $headers);
}
if($envioUsuarios) { // I then echo a message that the email was successfully sent.
echo 'Se envió mensaje a '. $listadoMails;
}
Te message appears as successfully sent. The mail is just sent to my own email, and the From line in that only email sent is "Nobody "
So I have two issues really:
BBC emails are not sent, and the From address won´t work either!