salve,
ho creato una pagina PHP collegata ad un form html in cui l'utente può inviare e-mail dal sito.
il problema è che se invio le e-mail a destinatario con indirizzo e-mail di GMAIL le manda correttamente mentre ad indirizzo FASTWEBNET non le manda..
posto il codice php:
codice htmlcodice:<?php // L'INDIRIZZO DEL DESTINATARIO DELLA MAIL $to = "indirizzo@fastwebnet.it"; // IL SOGGETTO DELLA MAIL $subject = "Modulo proveniente dal sito www.miosito.org"; // COSTRUZIONE DEL CORPO DEL MESSAGGIO $body = "Contenuto del modulo:\n\n"; $body .= "Dati personali ;nome: " . trim(stripslashes($_POST["nome"])) . "\n"; $body .= "cognome: " . trim(stripslashes($_POST["cognome"])) . "\n"; $body .= "Città: " . trim(stripslashes($_POST["citta"])) . "\n"; $body .= "Oggetto: " . trim(stripslashes($_POST["oggetto"])) . "\n"; $body .= "testo: " . trim(stripslashes($_POST["testo"])) . "\n"; $body .= "mail: " . trim(stripslashes($_POST["mail"])) . "\n"; // INTESTAZIONI SUPPLEMENTARI $headers = "From: Modulo utenti<INDIRIZZO-COME-SOPRA>"; // INVIO DELLA MAIL if(@mail($to, $subject, $body, $headers)) { // SE L'INOLTRO E' ANDATO A BUON FINE... echo "La mail è stata inoltrata con successo."; } else { // ALTRIMENTI... echo "Si sono verificati dei problemi nell'invio della mail."; } ?>
grazie mile!codice:<form name="form1" method="post" action="mail.php"> <table> <tr> <td colspan="2"> <div align="center"></div> </td> </tr> <tr> <td width="16%"Nome </td> <td width="84%"> <input type="text" name="nome"> </td> </tr> <tr> <td>Cognome </td> <td><input type="text" name="cognome"> </td> </tr> <tr> <td> Città </td> <td><input type="text" name="citta"> </td> </tr> <tr> <td>Indirizzo E-mail </td> <td><input type="text" name="mail"> </td> </tr> <tr> <td>Oggetto </td> <td><input type="text" name="oggetto"> </td> </tr> <tr> <td>Testo </td> <td><textarea name="testo" cols="40" rows="10"></textarea> </td> </tr> <tr> <td colspan="2"> </td> </tr> <tr> <td colspan="2"><div align="center"> <input type="submit" name="Submit" value="Invia"> </div> </td> </tr> </table> </form>![]()

Rispondi quotando