Archive

Posts Tagged ‘php’

PHP mail() UTF-8

March 17th, 2009 No comments
PHP:
  1. function mail_utf8($from, $to, $subject = '(No subject)', $message = '', $header = '') {
  2.   $header_ = 'MIME-Version: 1.0' . "\r\n" . 'Content-type: text/html; charset=UTF-8' . "\r\n";
  3.   $header_ .= "From: $from\r\n" . "Reply-To: $from\r\n";
  4.   mail($to, "=?UTF-8?B?".base64_encode($subject).'?=', $message, $header_ . $header);
  5. }

Categories: php_mysql Tags: , ,
17039 pages viewed, 0 today
11071 visits, 0 today
FireStats icon Powered by FireStats