Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP] mail nie działa, błąd z php mail
simman
post
Post #1





Grupa: Zarejestrowani
Postów: 21
Pomógł: 0
Dołączył: 23.05.2007

Ostrzeżenie: (10%)
X----


Cześć

chce skorzystać z funkcji mail ale coś mi nie działa. Proszę o rady.

Sprawdziłem mam ustawione 25
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\mail2\index.php on line 43

korzystam z gotowca ze strony php na moim localhost WAMP 2.0

Wpisałem tylko gdzie ma zostać wysłane smile.gif
Kod
<?php
// kilku odbiorców
$to  = 'sebekss@wp.pl' . ', '; // zwróćmy uwagę na przecinek
$to .= 'sebekss@wp.pl';

// temat
$subject = 'Birthday Reminders for August';

// wiadomość
$message = '
<html>
<head>
  <title>Birthday Reminders for August</title>
</head>
<body>
  <p>Here are the birthdays upcoming in August!</p>
  <table>
    <tr>
      <th>Person</th><th>Day</th><th>Month</th><th>Year</th>
    </tr>
    <tr>
      <td>Joe</td><td>3rd</td><td>August</td><td>1970</td>
    </tr>
    <tr>
      <td>Sally</td><td>17th</td><td>August</td><td>1973</td>
    </tr>
  </table>
</body>
</html>
';

// Aby wysłać e-mail HTML, musi być ustawiony nagłówek Content-type
$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

// Dodatkowe nagłówki
$headers .= 'To: Mary <mary@example.com>, Kelly <kelly@example.com>' . "\r\n";
$headers .= 'From: Birthday Reminder <birthday@example.com>' . "\r\n";
$headers .= 'Cc: birthdayarchive@example.com' . "\r\n";
$headers .= 'Bcc: birthdaycheck@example.com' . "\r\n";

// Wysłanie e-maila
mail($to, $subject, $message, $headers);
?>

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





Grupa: Zarejestrowani
Postów: 81
Pomógł: 14
Dołączył: 3.10.2007

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


A masz na localhoscie zainstalowany serwer SMTP? Na 99% nie. Wrzuc na jakis najprostrzy serwer w necie i powinno dzialac. Mniej to skomplikowane bedzie niz odpalenie smtp na localhoscie.
Go to the top of the page
+Quote Post
simman
post
Post #3





Grupa: Zarejestrowani
Postów: 21
Pomógł: 0
Dołączył: 23.05.2007

Ostrzeżenie: (10%)
X----


Cytat(Nh2003 @ 7.11.2010, 18:35:48 ) *
A masz na localhoscie zainstalowany serwer SMTP? Na 99% nie. Wrzuc na jakis najprostrzy serwer w necie i powinno dzialac. Mniej to skomplikowane bedzie niz odpalenie smtp na localhoscie.


Zainstalowałem teraz http://www.toolheap.com/test-mail-server-tool/ i niby wszystko okej ale nie doszło mi na poczte czemu?
Go to the top of the page
+Quote Post
Nh2003
post
Post #4





Grupa: Zarejestrowani
Postów: 81
Pomógł: 14
Dołączył: 3.10.2007

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


Zapoznaj sie najpierw co robi ten program a potem dopiero przylatuj na forum o pomoc.

Cytat
Test Mail Server Tool is a full featured mail (SMTP) server emulation to test mail sending capabilities of a web or desktop application or to preview messages before they are actually sent. This is a great tool for web programmers or application developers who need mail server for tests but don't want to install one.


Program UDAJE ze jest serwerem, przechwytuje maile ale ich nie wysyla. Nie jest to serwer SMTP tylko emulator serwera.
Go to the top of the page
+Quote Post
simman
post
Post #5





Grupa: Zarejestrowani
Postów: 21
Pomógł: 0
Dołączył: 23.05.2007

Ostrzeżenie: (10%)
X----


Wgrałem ISS windowsowego i teraz mam taki błąd

Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 Unable to relay for sebekss@wp.pl in C:\wamp\www\mail2\index.php on line 43
Go to the top of the page
+Quote Post
bastard13
post
Post #6





Grupa: Zarejestrowani
Postów: 664
Pomógł: 169
Dołączył: 8.01.2010
Skąd: Kraków

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


http://www.google.pl/#sclient=psy&hl=p...ng:+mail%28%29+[function.mail]%3A+SMTP+server+response%3A+550+5.7.1+Unable+to+relay+for&aq=f&aqi=&aql=&oq=&gs_rfai=&pbx=1&fp=2f292f5a698d60d6
Poprzeglądaj to, co znalazło google i powinno pomóc.


--------------------
Go to the top of the page
+Quote Post
simman
post
Post #7





Grupa: Zarejestrowani
Postów: 21
Pomógł: 0
Dołączył: 23.05.2007

Ostrzeżenie: (10%)
X----


Cytat(bastard13 @ 7.11.2010, 21:13:32 ) *
http://www.google.pl/#sclient=psy&hl=p...ng:+mail%28%29+[function.mail]%3A+SMTP+server+response%3A+550+5.7.1+Unable+to+relay+for&aq=f&aqi=&aql=&oq=&gs_rfai=&pbx=1&fp=2f292f5a698d60d6
Poprzeglądaj to, co znalazło google i powinno pomóc.


przeglądam ale nic nie widzę co bym potrzebował wszedłem nawet tutaj http://technet.microsoft.com/pl-pl/library...28WS.10%29.aspx i lipa


Teraz mam juz inny błąd Failed to connect to mailserver at "550 5.7.1" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set()

Nawet tak próbowałem
Kod
[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = 5.7.1
; http://php.net/smtp-port
smtp_port = 550


Warning: mail() [function.mail]: Failed to connect to mailserver at "5.7.1" port 550, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\wamp\www\mail2\index.php on line 43

Ten post edytował simman 7.11.2010, 21:26:50
Go to the top of the page
+Quote Post
celbarowicz
post
Post #8





Grupa: Zarejestrowani
Postów: 253
Pomógł: 31
Dołączył: 30.03.2009
Skąd: Szczecin

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


też kombinuję od roku jak wysyłać mail z lokalu ale wszystkie rady są do d...(próbowałem już różnych możliwości)
na cba działa ok
pozdrawiam
Go to the top of the page
+Quote Post
simman
post
Post #9





Grupa: Zarejestrowani
Postów: 21
Pomógł: 0
Dołączył: 23.05.2007

Ostrzeżenie: (10%)
X----


Cytat(celbarowicz @ 7.11.2010, 22:28:48 ) *
też kombinuję od roku jak wysyłać mail z lokalu ale wszystkie rady są do d...(próbowałem już różnych możliwości)
na cba działa ok
pozdrawiam


sad.gif
Go to the top of the page
+Quote Post
Mephistofeles
post
Post #10





Grupa: Zarejestrowani
Postów: 1 182
Pomógł: 115
Dołączył: 4.03.2009
Skąd: Myszków

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


Po co wysyłać maile z localhosta? Na localhoście to się testuje działanie, do tego takie symulatory wystarczą.
Go to the top of the page
+Quote Post
simman
post
Post #11





Grupa: Zarejestrowani
Postów: 21
Pomógł: 0
Dołączył: 23.05.2007

Ostrzeżenie: (10%)
X----


Cytat(Mephistofeles @ 7.11.2010, 23:02:04 ) *
Po co wysyłać maile z localhosta? Na localhoście to się testuje działanie, do tego takie symulatory wystarczą.


ja chce wiedzieć jak to zrobić a do czego jest mi to potrzebne to nie jest moim pytaniem smile.gif

Jestem już dalej niż bliżej zmieniłem nazwe domeny na localhost i teraz wszystko trafia do C:\Inetpub\mailroot\Drop smile.gif teraz zrobić aby jednak wysłało

Ten post edytował simman 8.11.2010, 00:26:46
Go to the top of the page
+Quote Post

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 Aktualny czas: 19.08.2025 - 17:56