Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [php] wysyłanie email skrypt przestał działać
jagwie
post 3.08.2014, 09:20:59
Post #1





Grupa: Zarejestrowani
Postów: 71
Pomógł: 0
Dołączył: 6.01.2008

Ostrzeżenie: (0%)
-----


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
  1. // WYSYLANIE WIADOMOSCI E-MAIL
  2. if(isset($_POST['imie']) && isset($_POST['email']) && isset($_POST['tresc'])) {
  3.  
  4. if(empty($_POST['imie']))
  5. $smarty->assign('bladEmail', 1);
  6. if(empty($_POST['email']))
  7. $smarty->assign('bladEmail', 1);
  8. if(empty($_POST['tresc']))
  9. $smarty->assign('bladEmail', 1);
  10.  
  11. if(!empty($_POST['imie']) and !empty($_POST['email']) and !empty($_POST['tresc'])) {
  12.  
  13. global $serwis_url ;
  14.  
  15. $tresc = '<!DOCTYPE HTML PUBLIC "-//W3C//Dtd HTML 5.0 transitional//EN">
  16.  
  17.  
  18. <html >
  19. <head>
  20. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  21. </head>
  22. <body style=" background:#e4e4e4; ">
  23. <div style="margin-left:auto; margin-right:auto; width:605px;">
  24. <div style=" float:left; width:5px; height:70; background:#0090c5;"></div>
  25. <div style="width:600px; height:70px; margin-left:5px; background:#75abbf; ">
  26. <div style="color:#ffffff; font-size:25px; margin-left:5px; font-family:Helvetica,Arial,sans-serif;">?</div>
  27. </div>
  28. <br/>
  29. <div style="float:left; width:5px; height:100%; background:#85bdad;"></div>
  30. <div style="width:600px; margin-left:5px; background:#ffffff; height:100%; font-size:20px;">
  31. <div style=" margin-left:5px; font-size:20px; font-family:Helvetica,Arial,sans-serif; ">
  32. Zapytanie o rezerwację noclegu wysłane z serwisu <hr>
  33. </div>
  34.  
  35. <div style=" margin-left:5px; font-size:20px; font-family:Helvetica,Arial,sans-serif; ">
  36. Treść:
  37. </div>
  38. <div style=" margin-left:5px; font-size:15px; font-family:Helvetica,Arial,sans-serif; ">
  39. '.nl2br(($_POST['tresc'])).'
  40. </div>
  41.  
  42.  
  43.  
  44.  
  45. </div>
  46. </div>
  47.  
  48. </body>
  49. </html>
  50.  
  51. ';
  52.  
  53. $headers .= 'Reply-To: <'.$_POST['email']."> \r\n";
  54. $headers .= 'From: "'.$_POST['imie'].'" <'.$_POST['email'].">\r\n";
  55. $headers .= 'Bcc: dodatkowyadres@op.pl' . "\r\n";
  56. //$headers .= "MIME-Version: 1.0 \r\n";
  57. $headers .= "Content-type: text/html; charset=utf-8";
  58. $headers = iconv("UTF-8","ISO-8859-2", $headers);
  59.  
  60. mail( $wynik['email'] , 'Zapytanie o nocleg wysłane z serwisu Nyny.pl', $tresc, $headers);
  61. $smarty->assign('wyslanyEmail', 1);
  62.  
  63. }
  64.  
  65. }

plik tpl
  1. {if $email ne ""}
  2. {if $wyslanyEmail == 1}
  3. <i class="red">Wiadomośc została wysłana pomyślnie</i>
  4. {elseif $bladEmail == 1}
  5. <i class="red">Uwaga!</i> Wiadomośc nie została wysłana. Sprawdź poprawność wpisanych danych w formularzu.
  6. {/if}
  7. <form method="post" action="">
  8. <div><b>Kontakt e-mail:</b>&nbsp; Jeżeli chcesz zarezerwować pokój / zadać pytanie właścicielowi.</div>
  9. <div><b>Imię i nazwisko:</b>&nbsp;<input name="imie"/></div>
  10. <div><b>E-mail:</b> &nbsp; <input name="email"/></div>
  11. <div><b>Treść wiadomości:</b></div>
  12. <div><textarea name="tresc" style="width:350px;height:150px;"></textarea></div>
  13. <input type="image" src="images/pl/ok.gif" class="noneInput" id="submit" value="OK" />
  14. </form>
  15. {/if}

dodam że serwer jest home
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 14.08.2025 - 17:15