Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Problem z wysyłaniem maila
zetor
post
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 (IMG:style_emoticons/default/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
 
Start new topic
Odpowiedzi
abort
post
Post #2





Grupa: Zarejestrowani
Postów: 590
Pomógł: 107
Dołączył: 25.10.2011

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


Naucz się nie tylko czytać, ale także rozumieć komunikaty o błędach:

[function.require-once]: failed to open stream: No such file or directory in C:\webserver\www\mail\mail3.php on line 2
A poniżej:
Fatal error: require_once() [function.require]: Failed opening required 'phpmailer/class.phpmailer.php' (include_path='.;C:\php\pear') in C:\webserver\www\mail\mail3.php on line 2

Pytanie: gdzie masz plik dołączany przez require?
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: 8.10.2025 - 12:50