Created
August 25, 2014 15:47
-
-
Save asilbalaban/e1094fd3637de29c1c25 to your computer and use it in GitHub Desktop.
UTF8 mail function.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function mail_utf8($to, $subject = '(No subject)', $message = '', $header = '') { | |
$header_ = 'MIME-Version: 1.0' . "\r\n" . 'Content-type: text/plain; charset=UTF-8' . "\r\n"; | |
mail($to, '=?UTF-8?B?'.base64_encode($subject).'?=', $message, $header_ . $header); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment