Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Problem z wysyłaniem maila
zetor
post 1.12.2011, 17:04:50
Post #1





Grupa: Zarejestrowani
Postów: 4
Pomógł: 0
Dołączył: 14.11.2011

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


Witam
jestem trochę zielony, więc nie niszczcie mnie od razu smile.gif . Mam takie pytanie jak wysłać maila za pomocą skryptu php. Mam win7x64 na wirtualnej maszynie (nie wiem też jaki to będzie miało wpływ), niby wszystko działa dodaję sobie rekordy do bazy itd itp, ale nie można wysłać maila, choćby za pomocą prostego kodu
  1.  
  2. <?php
  3.  
  4. if(mail('xxxxxx@xx.pl', 'Witaj', 'Oto test funkcji mail'))
  5. {
  6. echo 'Wiadomość została wysłana';
  7. }
  8. else echo 'błąd';
  9.  
  10.  
  11. ?>

Czy mam coś zmienić w php.ini w mail fuction?
  1.  
  2. [mail function]
  3. ; For Win32 only.
  4. ; <a href="http://php.net/smtp" target="_blank">http://php.net/smtp</a>
  5. SMTP = localhost
  6. ; <a href="http://php.net/smtp-port" target="_blank">http://php.net/smtp-port</a>
  7. smtp_port = 25
  8.  
  9. ; For Win32 only.
  10. ; <a href="http://php.net/sendmail-from" target="_blank">http://php.net/sendmail-from</a>
  11. sendmail_from = me@example.com
  12.  
  13. ; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
  14. ; <a href="http://php.net/sendmail-path" target="_blank">http://php.net/sendmail-path</a>
  15. ;sendmail_path =
  16.  
  17. ; Force the addition of the specified parameters to be passed as extra parameters
  18. ; to the sendmail binary. These parameters will always replace the value of
  19. ; the 5th parameter to mail(), even in safe mode.
  20. ;mail.force_extra_parameters =
  21.  
  22. ; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename
  23. mail.add_x_header = On
  24.  
  25. ; The path to a log file that will log all mail() calls. Log entries include
  26. ; the full path of the script, line number, To address and headers.
  27. ;mail.log =
  28.  


i czy jest jakaś inna łatwiejsza możliwość przesyłania maili?



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: 30.06.2025 - 06:11