Witam mam następujący problem szykuje nową wersie strony .
jakiś czas temu wstawiłem formulaż na stronie i wszystko działało poprawnie.
Lecz kiedy wczoraj sprawdzałem to na stronie jest niby wszystko ok wyskakuje komunikat o wysłaniu email lecz on nie dociera do adresata.
Poniżej podam skrypt php i plik tpl
// WYSYLANIE WIADOMOSCI E-MAIL
if(isset($_POST['imie']) && isset($_POST['email']) && isset($_POST['tresc'])) {
if(empty($_POST['imie'])) $smarty->assign('bladEmail', 1);
if(empty($_POST['email'])) $smarty->assign('bladEmail', 1);
if(empty($_POST['tresc'])) $smarty->assign('bladEmail', 1);
if(!empty($_POST['imie']) and
!empty($_POST['email']) and
!empty($_POST['tresc'])) {
$tresc = '<!DOCTYPE HTML PUBLIC "-//W3C//Dtd HTML 5.0 transitional//EN">
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style=" background:#e4e4e4; ">
<div style="margin-left:auto; margin-right:auto; width:605px;">
<div style=" float:left; width:5px; height:70; background:#0090c5;"></div>
<div style="width:600px; height:70px; margin-left:5px; background:#75abbf; ">
<div style="color:#ffffff; font-size:25px; margin-left:5px; font-family:Helvetica,Arial,sans-serif;">?</div>
</div>
<br/>
<div style="float:left; width:5px; height:100%; background:#85bdad;"></div>
<div style="width:600px; margin-left:5px; background:#ffffff; height:100%; font-size:20px;">
<div style=" margin-left:5px; font-size:20px; font-family:Helvetica,Arial,sans-serif; ">
Zapytanie o rezerwację noclegu wysłane z serwisu <hr>
</div>
<div style=" margin-left:5px; font-size:20px; font-family:Helvetica,Arial,sans-serif; ">
Treść:
</div>
<div style=" margin-left:5px; font-size:15px; font-family:Helvetica,Arial,sans-serif; ">
'.nl2br(($_POST['tresc'])).' </div>
</div>
</div>
</body>
</html>
';
$headers .= 'Reply-To: <'.$_POST['email']."> \r\n";
$headers .= 'From: "'.$_POST['imie'].'" <'.$_POST['email'].">\r\n";
$headers .= 'Bcc: dodatkowyadres@op.pl' . "\r\n";
//$headers .= "MIME-Version: 1.0 \r\n";
$headers .= "Content-type: text/html; charset=utf-8";
$headers = iconv("UTF-8","ISO-8859-2", $headers);
mail( $wynik['email'] , 'Zapytanie o nocleg wysłane z serwisu Nyny.pl', $tresc, $headers); $smarty->assign('wyslanyEmail', 1);
}
}
plik tpl
{if $email ne ""}
{if $wyslanyEmail == 1}
<i class="red">Wiadomośc została wysłana pomyślnie
</i> {elseif $bladEmail == 1}
<i class="red">Uwaga!
</i> Wiadomośc nie została wysłana. Sprawdź poprawność wpisanych danych w formularzu.
{/if}
<form method="post" action=""> <div><b>Kontakt e-mail:
</b> Jeżeli chcesz zarezerwować pokój / zadać pytanie właścicielowi.
</div> <input type="image" src="images/pl/ok.gif" class="noneInput" id="submit" value="OK" /> {/if}
dodam że serwer jest home