Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Funkcja mail()
wlamywacz
post 9.08.2007, 10:28:58
Post #1





Grupa: Zarejestrowani
Postów: 535
Pomógł: 27
Dołączył: 3.05.2005

Ostrzeżenie: (20%)
X----


Aktualnie walczę z funkcją mail(). Po przeszukaniu kilku en stron i manuala znalazłem poprawną kombinację nagłówków wszystko było pięknie do czasu próby wysłania emaila na pocztę wp.pl . Serwer odbija maila nawet nie ma go w folderze spam. Używam takich nagłówków:

  1. <?php
  2. $boundary = md5(uniqid(time()));
  3. $headers = 'From: ' . $from . "\n";
  4. $headers .= 'To: ' . $temail . "\n";
  5. $headers .= 'Return-Path: ' . $from . "\n";
  6. $headers .= 'MIME-Version: 1.0' ."\n";
  7. $headers .= 'Content-Type: multipart/alternative; boundary="' . $boundary . '"' . "\n\n";
  8. $headers .= $text_body . "\n";
  9. $headers .= '--' . $boundary . "\n";
  10. $headers .= 'Content-Type: text/plain; charset=UTF-8' ."\n";
  11. $headers .= 'Content-Transfer-Encoding: 8bit'. "\n\n";
  12. $headers .= $text_body . "\n";
  13. $headers .= '--' . $boundary . "\n";
  14. $headers .= 'Content-Type: text/HTML; charset=UTF-8' ."\n";
  15. $headers .= 'Content-Transfer-Encoding: 8bit'. "\n\n";
  16. $headers .= $body . "\n";
  17. $headers .= '--' . $boundary . "--\n";
  18. ?>


Czego tu brakuje że wp odbija ?

Onet, gmail, o2 itd. bez problemów.
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 - 12:51