I'm just register for this problem I search for ten days and I don't find any solution.
I use for my sites php and simple HTML form. After I change the host provider the form stop working. After I complete the form and press submit it send you to the Error page and no email is sent to me.
I have the old host and I use the same files nothing change and it's working. I've tried to change the php version in cpanel not working same error. I've tried other simple scrips and it's working so I don't need smtp to send emails.
<?
$numele=$_REQUEST['nume'];
$adresa=$_REQUEST['email'];
$telefon=$_REQUEST['tel'];
$comentariu=$_REQUEST['comentar'];
$catre="contact@mysite.ro";
$siteaddress ="http://www.mysite.ro";
$sitename = "Mysite.ro";
$mesaj="Un vizitator pe mysite.ro a lasat urmatorul mesaj:
Nume: $numele
Email: $adresa
Telefon: $telefon
Mesaj:
------------------------------
$comentariu";
if (!isset($_REQUEST['email'])) {
header( "Location: http://www.mysite.ro/index.html" );
}
elseif (empty($email) || empty($comentariu) || empty($numele) || empty($telefon)) {
header( "Location: http://www.musite.ro/contact-eroare.html" );
}
else {
mail($catre,"Contact Muri.ro",$mesaj,"From: $email" );
header( "Location: http://www.mysite.ro/contact-mesaj-trimis.html" );
}
//This sends a confirmation to your visitor
if (!isset($_REQUEST['email'])) {
header( "Location: http://www.mysite.ro/index.html" );
}
elseif (empty($email) || empty($comentariu) || empty($numele) || empty($telefon)) {
header( "Location: http://www.mysite.ro/contact-eroare.html" );
}
else {
mail("$email","Multumim pentru interesul acordat produselor oferite de noi.",
"Buna $numele,
Mesajul dvs. a fost inregistrat! Promitem sa raspundem in maxim 24 de ore.
Cu respect,
$sitename
$siteaddress
$catre","FROM:$catre");
header( "Location: http://www.mysite.ro/contact-mesaj-trimis.html" );
}
?>