Mam pewien kłopot z kodowaniem polskich znaków w funkcji mail(). Dokładnie chodzi o sam temat wiadomości, w treści jest ok. Z tego co zauważyłem w większości programów pocztowych (Apple Mail, The Bat, Outlook) oraz w panelu pocztowym o2.pl z kodowaniem w temacie wiadomości nie ma problemów. Problem pojawia się w panelach poczta.nazwa.pl czy poczta.home.pl. Tam w temacie wiadomości pojawiają się krzaki :/
Możecie coś poradzić ?
Kod wygląda tak:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <meta http-equiv="Content-Language" content="pl" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body> <?php // multiple recipients $to = 'kontakt@adres.pl'; // subject $subject = 'Polskie ąęćź'; // message $message = ' <html> <head> <title>Birthday Remąężinders for August</title> </head> <body> <p>Heresąććś 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> '; // To send HTML mail, the Content-type header must be set $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= "Content-Type: text/html;charset=utf-8\n"; $headers .= "Content-Transfer-Encoding: 8bit\n"; // Additional headers $headers .= 'From: Birthday Reminder <birthday@example.com>' . "\r\n"; // Mail it ?> </body> </html>