Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /data/e/7/e76990b9-3372-4d88-8089-fce36e16744a/webperfection.net/sub/rady-nosu/wp-content/plugins/seo-ultimate/modules/class.su-module.php on line 1195
utf-8 mail v php - phpmailer

December 2, 2011 | In: Programovanie

utf-8 mail v php – phpmailer

phpmailer s utf-8 – diakritikou

jedine čo potrebujete je asi CharSet… anyway, cely mejl…

require ‘class.phpmailer.php’;
$mail = new PHPMailer(true);
$body = file_get_contents(‘nl.html’); // nas html document s obrazkami
$body = preg_replace(‘/\\\\/’,”, $body);
$mail->IsSMTP();
$mail->SMTPAuth = true;
$mail->Port = 25;
$mail->Host = “localhost”;
$mail->CharSet = ‘UTF-8’;
$mail->AddAddress(‘kuko@example.com’); // komu 😉
$mail->Subject = ‘Neaká diakříťika’;
$mail->WordWrap = 80;
$mail->MsgHTML($body);
$mail->IsHTML(true);
$mail->Send();

Share This:

Comments are closed.