Autor | Zpráva | ||
---|---|---|---|
grimword Profil |
Pokud mým skriptem pošlu mail() na seznam.cz apod. tak vše funguje. V případě atlas.cz nebo centrum.cz ne.
TOTO JE MŮJ SKRIPT $subject = "TITULEK"; $telo = file_get_contents('http://www.example.com/email.txt'); $headers= "From: JMENO <ADRESA>\r\n"; $headers.= "Reply-To: JMENO <ADRESA>\r\n"; $headers.= "X-Mailer: PHP/" . phpversion()."\r\n"; $headers.= "MIME-Version: 1.0" . "\r\n"; $headers.= "Content-type: text/html; charset=UTF-8\r\n"; mail ($email1, $subject, $telo, $headers); TAKTO TO DORAZÍ (ano, ty hlavičky se zobrazí taky) Reply-To: JMENO <EMAIL> X-Mailer: PHP/5.3.21 MIME-Version: 1.0 Content-type: text/html; charset=UTF-8 Message-Id: <XXXXXXXXXXXXXXXXXX> Date: Sun, 15 Jun 2014 13:37:09 +0200 (CEST) Dobr den,<br> xxxxxxxxxxxxxxxxxx<br><br> |
||
juriad Profil |
#2 · Zasláno: 15. 6. 2014, 13:48:31
To je způsobené nadbytečnými odřádkováními. Prázdný řádek (mezi From a Reply-To) znamená konec hlavičky a začátek těla.
Přečti si poznámku k parametru additional_headers funkce mail: If messages are not received, try using a LF (\n) only. Some Unix mail transfer agents (most notably » qmail) replace LF by CRLF automatically (which leads to doubling CR if CRLF is used). This should be a last resort, as it does not comply with » RFC 2822. Zkus odstranit \r a ponechej jen \n. |
||
grimword Profil |
#3 · Zasláno: 15. 6. 2014, 15:08:36
Odstranil jsem \r a funguje to v pořádku.
Děkuji |
||
Časová prodleva: 11 let
|
0