Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: Funkcja mail i nagłówki
Forum PHP.pl > Forum > PHP
wojbaz
Cześć,

Przeskanowałem forum i google w poszukiwaniu tematu, ale jednoznacznej informacji nie znalazłem.
W kodzie definiuję nagłówek maila podając w polu From adres email z formularza (jakikolwiek). Kiedy wysyłam maila ten nie dociera do adresata. Mail dociera tylko i wyłącznie kiedy w polu from wpiszę adres email z którego rzeczywiście wysyłany jest email (konto na domyślnym serwerze pocztowym). Wcześniej taka instrukcja działała poprawnie, ale nagle przestała. Czy jest możliwe, żeby firma hostingowa zablokowała możliwość sztucznego ustawiania pola From w nagłówku np żeby uniknąć nadużyć ? (mogę tam sobie wpisać np. barack@obama.us i też by działało). Używam obecnie hostingu home.pl .

Składnię sprawdzałem więc to nie to smile.gif

Z góry dzięki za wyjaśnienie również sugestie rozwiązania.
YourFrog
[kryptoreklama]Cytat z github'a jednej z najpopularniejszych bibliotek do wysyłania e-mailów przez PHP[/kryptoreklama]

Kod
Many PHP developers utilize email in their code. The only PHP function that supports this is the mail() function. However, it does not provide any assistance for making use of popular features such as HTML-based emails and attachments.

Formatting email correctly is surprisingly difficult. There are myriad overlapping RFCs, requiring tight adherence to horribly complicated formatting and encoding rules - the vast majority of code that you'll find online that uses the mail() function directly is just plain wrong! Please don't be tempted to do it yourself - if you don't use PHPMailer, there are many other excellent libraries that you should look at before rolling your own - try SwiftMailer, Zend_Mail, eZcomponents etc.

The PHP mail() function usually sends via a local mail server, typically fronted by a sendmail binary on Linux, BSD and OS X platforms, however, Windows usually doesn't include a local mail server; PHPMailer's integrated SMTP implementation allows email sending on Windows platforms without a local mail server.



Żeby nie było że faworyzuje
PHPMailer
ZendMail
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.