Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [PHP] Wysyłanie email
Vion
post
Post #1





Grupa: Zarejestrowani
Postów: 112
Pomógł: 2
Dołączył: 27.06.2008

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


Witam
Mam taki skrypt
  1. <?php
  2. mail("mojadres@gazetapl", "witaj", "djsfsfhgs");
  3. ?>

ale po jego uruchomieniu wyskakuje mi taki błąd.
Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in C:\wamp\www\olubuskie\sendmail.php on line 2
Co jest nie tak?
Go to the top of the page
+Quote Post
tehaha
post
Post #2





Grupa: Zarejestrowani
Postów: 1 748
Pomógł: 388
Dołączył: 21.08.2009
Skąd: Gdynia

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


no przecież masz treść błędu: ustaw odpowiednio php.ini albo ustaw nagłówek From: dla wysyłanej wiadomości
Go to the top of the page
+Quote Post
Vion
post
Post #3





Grupa: Zarejestrowani
Postów: 112
Pomógł: 2
Dołączył: 27.06.2008

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


Okej, zrobiłem tak, ale teraz mi wyskakuje taki błąd.

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() in C:\wamp\www\olubuskie\sendmail.php on line 7

a o to właściwości z pliku php.ini

[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25

; For Win32 only.
;sendmail_from = brzoski@o2.pl

; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path =

; Force the addition of the specified parameters to be passed as extra parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail(), even in safe mode.
;mail.force_extra_parameters =
Go to the top of the page
+Quote Post
Van Pytel
post
Post #4





Grupa: Zarejestrowani
Postów: 150
Pomógł: 6
Dołączył: 3.03.2010

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


Masz zablokowany port 25 i musisz go zmienic.
Go to the top of the page
+Quote Post
Vion
post
Post #5





Grupa: Zarejestrowani
Postów: 112
Pomógł: 2
Dołączył: 27.06.2008

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


a na jaki zmienić ?
Go to the top of the page
+Quote Post
Van Pytel
post
Post #6





Grupa: Zarejestrowani
Postów: 150
Pomógł: 6
Dołączył: 3.03.2010

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


587
Go to the top of the page
+Quote Post
krzysztof_kf
post
Post #7





Grupa: Zarejestrowani
Postów: 1 135
Pomógł: 158
Dołączył: 19.03.2009
Skąd: Toruń

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


Cytat(Vion @ 7.06.2010, 16:49:11 ) *
a na jaki zmienić ?



Zastosuj się do tych porad http://forum.php.pl/index.php?showtopic=30728 Wyszukiwarka jest na forum która odpowie ci na problem .
Go to the top of the page
+Quote Post
Vion
post
Post #8





Grupa: Zarejestrowani
Postów: 112
Pomógł: 2
Dołączył: 27.06.2008

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


po zmianie portu nadal wyskakuje ten sam bład.
Go to the top of the page
+Quote Post
Van Pytel
post
Post #9





Grupa: Zarejestrowani
Postów: 150
Pomógł: 6
Dołączył: 3.03.2010

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


To musisz sprawdzac ktory jest ok.
Najlepiej przed wysylanie ustaw sobie
Kod
ini_set('smtp_port',587);

i zmieniaj tylko wartosc 587 az zaskoczy

Ten post edytował Van Pytel 7.06.2010, 16:11:08
Go to the top of the page
+Quote Post
Vion
post
Post #10





Grupa: Zarejestrowani
Postów: 112
Pomógł: 2
Dołączył: 27.06.2008

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


a muszę mieć zainstalowany jakiś serwer pocztowy ? bo nic takiego nie mam
Go to the top of the page
+Quote Post
Van Pytel
post
Post #11





Grupa: Zarejestrowani
Postów: 150
Pomógł: 6
Dołączył: 3.03.2010

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


No raczej musisz miec, zakladalem ze masz zainstalowany.
Go to the top of the page
+Quote Post
krzysztof_kf
post
Post #12





Grupa: Zarejestrowani
Postów: 1 135
Pomógł: 158
Dołączył: 19.03.2009
Skąd: Toruń

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


Kolego czytasz ze zrozumieniem


sendmail_from = twój email plik php.ini


po co kombinacje ?

Edit Zastosuj się do tych poleceń Link

Ten post edytował krzysztof_kf 7.06.2010, 16:38:01
Go to the top of the page
+Quote Post
Vion
post
Post #13





Grupa: Zarejestrowani
Postów: 112
Pomógł: 2
Dołączył: 27.06.2008

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


mam tam wpisany swój adres email.
Go to the top of the page
+Quote Post

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: 4.10.2025 - 08:16