Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [PHP] Funkcja mail
Forum PHP.pl > Forum > Przedszkole
b4rt3kk
Witam,
problem dotyczy funkcji mail.

  1. mail ("mail@mail.com", $temat, $tresc, $header); //wysyła wiadomość bez problemów
  2.  
  3. $adresat="mail@mail.com";
  4. mail ($adresat, $temat, $tresc, $header); //również nie ma problemów, mail idzie
  5.  
  6. $adresat=$_POST['adresat'];
  7. mail ($adresat, $temat, $tresc, $header); //czasem wysyła, a czasem nie wysyła, nie mam pojęcia o co chodzi, błąd opisze poniżej
  8.  
  9. $adresat=trim((string)$_POST['adresat']); // myślałem, że tu leży problem, a niemal jestem tego pewien, ale co jest nie tak z tym stringiem? Kiedy wpisze e-mail na stałe to nie ma problemu z wysłaniem. Dlatego dla pewności zamieniłem zmienną na stringa i usunąłem białe znaki, no i czasem to działa a czasem nie.
  10. mail ($adresat, $temat, $tresc, $header);
  11.  


Warning: mail(): SMTP server response: 550 Invalid recipient: bw2424@gmail.com in c:\usr\krasnal\www\Funkcje\fun_rejestracja.php on line 100

Czy naprawdę nikt nie wie o co to może chodzić? Liczę na każdą sugestię.
czachor
Poczytaj: http://www.google.com/support/forum/p/Goog...8c5f8&hl=en może Ci pomoże.
thek
Pierwszy wynik dla frazy "smtp error 550":
Cytat
SMTP Error - 550

Requested Not Action: mailbox unavailable or is not local.

This message indicates that the recipient specified in the RCPT command is not locally hosted on the server and relaying options prevent the message being forwarded to the recipient. To resolve this you should ensure that an address map has been associated with the desired mailbox. If you receive this message then you should use the MMC to ensure that this address has been assigned to a mailbox. This can be done in the MMC by viewing the properties of the Mailbox.
Tak więc jak widzisz problem nie musi być po stronie nie czyszczonego maila, ale także serwera poczty.
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.