Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: XAMPP mail() nie działa
Forum PHP.pl > Forum > PHP
pain3hp
Wiem że to kolejny temat z tym problemem jednak sprawdziłem większość z googla (nawet angielskie) i dalej problem jest,

pracuje na kohanie i taki blad mi zwraca
  1. 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()


na routerze ustawiałem port 25 na SMTP

php.ini
  1. [mail function]
  2. ; For Win32 only.
  3. ; <a href="http://php.net/smtp" target="_blank">http://php.net/smtp</a>
  4. SMTP = localhost
  5. ; <a href="http://php.net/smtp-port" target="_blank">http://php.net/smtp-port</a>
  6. smtp_port = 25
  7.  
  8. ; For Win32 only.
  9. ; <a href="http://php.net/sendmail-from" target="_blank">http://php.net/sendmail-from</a>
  10. sendmail_from = postmaster@localhost
  11.  
  12. ; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
  13. ; <a href="http://php.net/sendmail-path" target="_blank">http://php.net/sendmail-path</a>
  14. ;sendmail_path = "\"\xampp\sendmail\sendmail.exe\" -t"
  15.  
  16. ; Force the addition of the specified parameters to be passed as extra parameters
  17. ; to the sendmail binary. These parameters will always replace the value of
  18. ; the 5th parameter to mail(), even in safe mode.
  19. ;mail.force_extra_parameters =
  20.  
  21. ; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename
  22. mail.add_x_header = Off
  23.  
  24. ; Log all mail() calls including the full path of the script, line #, to address and headers
  25. ;mail.log = "\xampp\apache\logs\php_mail.log"


sendmail.ini
  1. # Example for a user configuration file
  2.  
  3. # Set default values for all following accounts.
  4. defaults
  5. logfile "\xampp\sendmail\sendmail.log"
  6.  
  7. # Mercury
  8. account Mercury
  9. host localhost
  10. from postmaster@localhost
  11. auth off
  12.  
  13. # A freemail service example
  14. account Hotmail
  15. tls on
  16. tls_certcheck off
  17. host smtp.live.com
  18. from [exampleuser]@hotmail.com
  19. auth on
  20. user [exampleuser]@hotmail.com
  21. password [examplepassword]
  22.  
  23. # Set a default account
  24. account default : Mercury

Bardzo proszę o pomoc, nagłówki są wysłane, funkcja jest wywoływana:
  1. $headers = 'MIME-Version: 1.0'."\r\n";
  2. $headers .= 'Content-type: text/html; charset=utf-8'."\r\n";
  3. mail($email, $temat, $wiadomosc, $headers);

wszystkie zmienne są.

;sendmail_path = "\"\xampp\sendmail\sendmail.exe\" -t"

usunąłem z tego średnik teraz sie uruchamia bez błędu, ale maile nie dochodzą a tak w ogole to ja wysyłam na serwery interii.pl czy to w ogole jest możliwe? Czy ja przypadkiem moge wysylac jedynie na localhosta?

moge zapłacić SMSem do 15zł za pomoc.....
JoShiMa
To może lepiej sobie zainstalować Papercut smile.gif
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.