Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Problem przy funkcji mail
Alik
post
Post #1





Grupa: Zarejestrowani
Postów: 8
Pomógł: 0
Dołączył: 4.06.2006

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


Witam,
mam problem, ponieważ niewiem czemu ale kiedy wysyłam mail ze strony, na web maila przychodzi mi ładnie w HTML ale już na Outlooka przychodzi mi cały kod HTML maila.
Próbowałem wszystkie blokady w Outlooku pozdejmować ale dalej mam to samo.
Kod strony do wysłania mail jest napewno prawidłowy bo pochodzi z manula php.
Myślę że trzeba coś przestawić w Outlooku tylko co?(IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif)
Z góry dziękuje za chęć pomocy.
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
JohnySpot
post
Post #2





Grupa: Zarejestrowani
Postów: 106
Pomógł: 0
Dołączył: 9.09.2003
Skąd: Włocławek

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


Nie wiem czy Ci to coś pomorze:
W dokumentacji php (http://pl2.php.net/manual/pl/ref.mail.php) zwróciłem uwagę na ten kod:

  1. <?php
  2. //add From: header
  3. $headers = "From: webserver@localhostrn";
  4.  
  5. //specify MIME version 1.0
  6. $headers .= "MIME-Version: 1.0rn";
  7.  
  8. //unique boundary
  9. $boundary = uniqid("HTMLDEMO");
  10.  
  11. //tell e-mail client this e-mail contains//alternate versions
  12. $headers .= "Content-Type: multipart/mixed; boundary = $boundaryrnrn";
  13.  
  14. //plain text version of message
  15. $body = "--$boundaryrn" .
  16.  "Content-Type: text/plain; charset=ISO-8859-1rn" .
  17.  "Content-Transfer-Encoding: base64rnrn";
  18. $body .= chunk_split(base64_encode("This is the plain text version!"));
  19.  
  20. //HTML version of message
  21. $body .= "--$boundaryrn" .
  22.  "Content-Type: text/html; charset=ISO-8859-1rn" .
  23.  "Content-Transfer-Encoding: base64rnrn";
  24. $body .= chunk_split(base64_encode("This the <b>HTML</b> version!"));
  25.  
  26. //send message
  27. mail("root@localhost", "An HTML Message", $body, $headers);
  28. ?>


Przyjżyj się temu bliżej

i tu: http://www.phpguru.org/static/htmlMimeMail5.html
Go to the top of the page
+Quote Post

Posty w temacie


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

 



RSS Aktualny czas: 7.10.2025 - 16:25