Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [PHP]PHPMailer - polskie znaki ROZWIĄZANE
Forum PHP.pl > Forum > Przedszkole
peter13135
PROBLEM ROZWIĄZANY


jakimś wystarczyło dać
  1. $CharSet = 'UTF-8';

  1. $mail_tpl = new Smarty();
  2. $mail_tpl->assign(array('question'=>nl2br($_POST['question']), 'from'=>$_SESSION['user_email']));
  3. $conf = conf::getInstance();
  4. $phpmailer = new PHPMailer(true);
  5. $phpmailer->IsSMTP();
  6. $phpmailer->Mailer = "smtp";
  7. $phpmailer->SMTPDebug = 1;
  8. $phpmailer->SMTPAuth = true; // enable SMTP authentication
  9. $phpmailer->Host = $conf->get('mail_host');
  10. $phpmailer->Port = $conf->get('mail_port');
  11. $phpmailer->Username = $conf->get('mail_username');
  12. $phpmailer->Password = $conf->get('mail_pass');
  13.  
  14. $phpmailer->AddReplyTo($conf->get('mail_username'), 'Administrator');
  15. $phpmailer->SetFrom($conf->get('mail_username'), 'Administrator');
  16. $phpmailer->Subject = 'Pytanie';
  17. $phpmailer->MsgHTML($mail_tpl->fetch('templates/mail_ask.tpl'));
  18. $phpmailer->AddAddress($conf->get('mail_username'));
  19. $phpmailer->Send();


w nagłówku strony jest
  1. <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>


szablon maila to
  1. <div style="padding:10px;padding-top:20px;width: 546px;margin: auto;">
  2. Użytkownik {$from} pyta : <br /><hr />
  3. {$question}
  4. <hr />
  5. </div>


Polskie znaki mam na gmailu.
Krzaki są na wp.pl, roundcube.

Co może być tego przyczyną i jak rozwiązać problem ?
nospor
No ale dla PHPMailer też trzeba powiedzieć, że dane to utf8
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.