Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> mail();
zen
post
Post #1





Grupa: Zarejestrowani
Postów: 16
Pomógł: 0
Dołączył: 12.12.2005

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


Witam!

Mam taki problem chce wysłać maila od siebie z kompa ale coś jest nie tak

Mam taki skrypt prosty jak drut
Cytat
<?php
$do='reaktor@poczta.onet.pl';
$temat='list wyslany ze strony';
$tresc='jakas tresc';

if(mail($do,$temat,$tresc))
{
echo ('wyslany');
}
else
{
echo ('niewyslany');
}

?>



A wywala mi taki błąd
Cytat
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 G:\apachefriends\xampp\htdocs\index2.php on line 14
niewyslany


Tylko nie wiem co jest nie tak.

Pozdrawiam
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 9)
mike
post
Post #2





Grupa: Przyjaciele php.pl
Postów: 7 494
Pomógł: 302
Dołączył: 31.03.2004

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


A masz postawiony i skonfigurowany serwer SMTP na swoim komputerze?
Bo coś mi się widzi, że nie masz :-)

----added----
Popraw posta powyżej stosując odpowiedni bbCode
Go to the top of the page
+Quote Post
cadavre
post
Post #3





Grupa: Zarejestrowani
Postów: 472
Pomógł: 7
Dołączył: 7.12.2005
Skąd: Gliwice

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


Plik php.ini (tylko)?
Go to the top of the page
+Quote Post
Fipaj
post
Post #4





Grupa: Zarejestrowani
Postów: 691
Pomógł: 0
Dołączył: 19.01.2005
Skąd: Warszawa

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


Cadavre, czy ty umiesz czytać?
Tłumaczenie komunikatu:
Cytat
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 G:\apachefriends\xampp\htdocs\index2.php on line 14
niewyslany

Cytat
Nie można połączyć z serwerem pocztowym "localhost" na porcie 25, sprawdź ustawienia "SMTP" i "smtp_port" w twoim pliku php.ini lub użyj ini_set()

...
Go to the top of the page
+Quote Post
cadavre
post
Post #5





Grupa: Zarejestrowani
Postów: 472
Pomógł: 7
Dołączył: 7.12.2005
Skąd: Gliwice

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


No wiem, ja pytałem z innej beczki, bo problem mnie nie dotyczy. Jeszcze serwa Mail nie mam ale będę musał złożyć. (IMG:http://forum.php.pl/style_emoticons/default/tongue.gif)
Go to the top of the page
+Quote Post
zen
post
Post #6





Grupa: Zarejestrowani
Postów: 16
Pomógł: 0
Dołączył: 12.12.2005

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


Macie racje ni mom (IMG:http://forum.php.pl/style_emoticons/default/sad.gif)
Ale zainstaluje.

Dzieki


Teraz taka sprawa...

Czy mogę skonfigurować Apache żeby wysyłał maile np. z mojego poczty na poczcie.onet.pl?

Jeżeli tak to jak to się robi?

pozdrawiam

Ten post edytował zen 31.12.2005, 23:20:39
Go to the top of the page
+Quote Post
snipe
post
Post #7





Grupa: Zarejestrowani
Postów: 135
Pomógł: 1
Dołączył: 5.10.2005
Skąd: Opole/Chorzów

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


  1. <?php
  2. mail('odbiorca@poczta.onet.pl', 'tytul', 'tresc', 'From: nadawca@poczta.onet.pl');
  3. ?>


pozdro (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)

Ten post edytował snipe 1.01.2006, 12:51:48
Go to the top of the page
+Quote Post
zen
post
Post #8





Grupa: Zarejestrowani
Postów: 16
Pomógł: 0
Dołączył: 12.12.2005

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


Sorry albo jestem jakiś ułomny albo to nie działa

na podstawie tego kodu:
Cytat
<?php
mail('odbiorca@poczta.onet.pl', 'tytul', 'tresc', 'From: nadawca@poczta.onet.pl');
?>


dalej wywala mi blad:

Cytat
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 G:\apachefriends\xampp\htdocs\index2.php on line 2


POZDRAWIAM
Go to the top of the page
+Quote Post
snipe
post
Post #9





Grupa: Zarejestrowani
Postów: 135
Pomógł: 1
Dołączył: 5.10.2005
Skąd: Opole/Chorzów

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


zen musisz miec zainstalowany serwer smtp lub dostep do takiego i wpisac odpowiednia konfiguracje do php.ini (IMG:http://forum.php.pl/style_emoticons/default/winksmiley.jpg)
Go to the top of the page
+Quote Post
zen
post
Post #10





Grupa: Zarejestrowani
Postów: 16
Pomógł: 0
Dołączył: 12.12.2005

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


oki!!!
Wszystko jasne.
Dzięki (IMG:http://forum.php.pl/style_emoticons/default/biggrin.gif)

Pozdrawima
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: 22.08.2025 - 17:29