Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [php] wysyłanie maila..
kefir667
post
Post #1





Grupa: Zarejestrowani
Postów: 21
Pomógł: 0
Dołączył: 26.01.2008

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


Witam, domyślam się, że ten temat już Was męczy, ale proszę pomóżcie (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)

  1. <?php
  2. $tresc="a taki tam mail testowy";
  3. $temat="SKRYPT PHP";
  4.  
  5.  
  6. $odKogo="jaaaa@op.pl"; // e-mail nadawcy
  7. $imie="Skrypt PHP"; //imie nadawcy
  8. $doKogo="do_mnie@wp.pl"; //adres odbiorcy
  9. //nagłówki maila
  10. $headers = "Return-Path: &lt;mail_zwrotny&gt;r\n";
  11. $headers = "MIME-Version: 1.0 r\n";
  12. $headers .= "Content-type: text/html; charset=iso-8859-2 r\n";
  13. $headers .= "From: \"$odKogo\" &lt;mail_odKogo&gt;r\n";
  14. $headers .= "Reply-To: \"$odKogo\" &lt;mail_reply_DoKogo&gt;r\n";
  15. $headers .= "X-Priority: 1r\n";
  16. $headers .= "X-MSMail-Priority: Highr\n";
  17. //konwertowanie z utf-8 na iso 8859-2
  18. $tresc = stripslashes($tresc);
  19. $tresc = strtr($tresc, "xA5x8Cx8FxB9x9Cx9F", "xA1xA6xACxB1xB6xBC");
  20. $temat = stripslashes($temat);
  21. $temat = strtr($temat, "xA5x8Cx8FxB9x9Cx9F", "xA1xA6xACxB1xB6xBC");
  22. //wysyłanie maila
  23. mail("$doKogo", "$temat","$tresc",$headers);
  24. ?>


Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set()

czy możecie mi pokazac jak zdefiniowac serwer smtp, port i ze jest wymagana autoryzacja ?
czyli chodzi o wyslanie maila z konta np na onet.pl

Pozdrawiam!
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: 22.08.2025 - 18:08