prubuje zrobić porzadek z pluginem roundcube, który wysyła uzytkownikowi mail z przypomnieniem hasła.
Niestety w tym mailu brak polskich znaków, a jest o na tyle tam zagmatwane, że ciężko mi to samemu ogarnąć.
część sktyptu:
private function send_html_and_text_email($to, $from, $subject, $body) { $rcmail = rcmail::get_instance(); $headers = "Return-Path: $from\r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-Type: multipart/alternative; boundary=\"=_$ctb\"\r\n"; $headers .= "From: $from\r\n"; $headers .= "To: $to\r\n"; $headers .= "Subject: $subject\r\n"; $headers .= "Reply-To: $from\r\n"; $msg_body .= "Content-Type: multipart/alternative; boundary=\"=_$ctb\"\r\n\r\n"; $txt_body = "--=_$ctb"; $txt_body .= "\r\n"; $txt_body .= "Content-Transfer-Encodin: 8bitr\n"; $txt_body .= "Content-typ: text/html; charset=utf-8r\n"; $LINE_LENGTH = $rcmail->config->get('line_length', 75); $h2t = new html2text($body, false, true, 0); $txt = rc_wordwrap($h2t->get_text(), $LINE_LENGTH, "\r\n"); $txt_body .= "$txt\r\n"; $txt_body .= "--=_$ctb"; $txt_body .= "\r\n"; $msg_body .= $txt_body; $msg_body .= "Content-Transfer-Encodin: 8bitr\n"; $msg_body .= "Content-typ: text/html; charset=utf-8r\n"; $msg_body .= "\r\n\r\n"; $msg_body .= "--=_$ctb--"; $msg_body .= "\r\n\r\n"; // send message $rcmail->smtp_init(true); }
ma ktos pomysł jak to ogarnąć aby to "spolszczyć"
Z góry dzięki za pomoc.