ciao a tutti
sto impostando un form che dovrebbe inviare una mail ad un indirizzo predefinito ed una all'indirizzo del compilante.
solamente che mi invia solamente la mail all'indirizzo predefinito mentre quella di conferma non la manda e non capisco perchè!!!
potete aiutarmi?
Codice PHP:
// create email headers Mail conferma utente
$headers_usr = "From: " .clean_string($email_to). "\r\n";
$headers_usr .= "Reply-To: ".clean_string($email_to). "\r\n" .
'X-Mailer: PHP/' . phpversion();
$headers_usr .= "MIME-Version: 1.0\r\n";
$headers_usr .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
// create email message Mail conferma utente 10CC
$email_message_usr = '<html><head></head><body>';
$email_message_usr .= '<h2>Confirmation</h2>
Thanks for signing up to 10 Corso Como newsletter</p>';
$email_message_usr .= '</td></tr></table></body></html>';
// create email headers Mail iscrizione
$headers = "From: " .clean_string($email_from). "\r\n";
$headers .= "Reply-To: ".clean_string($email_from). "\r\n" .
'X-Mailer: PHP/' . phpversion();
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
// create email message Mail iscrizione 10CC
$email_message = '<html><head></head><body>';
$email_message .= '<h1>Nuova iscrizione alla Newsletter 10CC</h1>';
$email_message .= '</body></html>';
//EMAIL CONFERMA UTENTE 10CC
if (mail($email_to, $email_cc_subject, $email_message, $headers)){
if (mail($email_from, $email_user_cc_subject, $email_message_usr, $headers_usr)){
header('Location: thanks.htm');
exit();}
} else {
echo 'There was a problem sending the email.';
}
lo script completo qui
delle due email l'unica che parte è questa
Codice PHP:
mail($email_to, $email_cc_subject, $email_message, $headers)
questo indipendentemente che venga chiamata per prima o per seconda
spero possiate aiutarmi perchè non so più che pesci prendere!!!
ciao
daniele