![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 306 Pomógł: 32 Dołączył: 20.01.2008 Ostrzeżenie: (20%) ![]() ![]() |
Napisałem prosty skrypt do wysyłania maili, jednak mam pewien problem. Kiedy np. w temacie lub w tekście wpisuje jakiś polski znak, na moją testową pocztę dochodzi taka wiadomość (mam pocztę na gmail.com):
Cytat CORRUPTED MESSAGE This is the Courier Mail Server 0.53 on v1.yoyo.pl. I received the following message for delivery to your address. This message contains several internal formatting errors. This is often caused by viruses that attempt to infect remote systems. Instead of blocking this message, I converted it to a safe, text-only attachment that can be safely read with a text editor. This sometimes also happens when the sender's mail software has a bug that creates improperly-formatted messages. Although these kinds of formatting errors may often be ignored by other mail servers, this server detects and intercepts improperly-coded messages in order to prevent viruses from taking advantage of bugs in E-mail programs: ----------------------------------------------------------------------------- This message contains improperly-formatted binary content, or attachment. See <URL:ftp://ftp.isi.edu/in-notes/rfc2045.txt> for more information. To są znaczniki, które wysyłam: Kod $header = "MIME-Versio: 1.0\r\n"."Content-type: text/html; charset=ISO-8859-1\r\n"; A to sam mail() Kod mail($odbiorca, $temat, $content, $header)
-------------------- |
|
|
![]() |
![]()
Post
#2
|
|
![]() Grupa: Zarejestrowani Postów: 2 592 Pomógł: 445 Dołączył: 12.03.2007 Ostrzeżenie: (0%) ![]() ![]() |
Skoro coś niedziała jak ktoś użyje polskich znaków, zatem to wina kodowania (ISO-8859-1).
ustaw kodowanie na: content="text/html; charset=iso-8859-2" albo najlepiej na utf-8 i powinno być dobrze. -------------------- |
|
|
![]()
Post
#3
|
|
Grupa: Zarejestrowani Postów: 306 Pomógł: 32 Dołączył: 20.01.2008 Ostrzeżenie: (20%) ![]() ![]() |
Używałem ISO-8859-2, ale jest to samo. Używałem UTF-8 i jest nadal tak samo. Więco co mam ustawić?
-------------------- |
|
|
-erbi- |
![]()
Post
#4
|
Goście ![]() |
|
|
|
![]()
Post
#5
|
|
Grupa: Zarejestrowani Postów: 306 Pomógł: 32 Dołączył: 20.01.2008 Ostrzeżenie: (20%) ![]() ![]() |
Już sobie sam poradziłem przenosząc skrypt na inny serwer... Ale dzięki za chęci...
-------------------- |
|
|
![]() ![]() |
![]() |
Wersja Lo-Fi | Aktualny czas: 13.08.2025 - 23:04 |