Created
March 10, 2016 07:24
-
-
Save webestet/f944d530090bc11ae424 to your computer and use it in GitHub Desktop.
mail provision
This file contains 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
Создать файл test.php c кодом (затем перейти для проверки по адресу www.your-domen.ru/test.php): | |
<?php | |
function mail_utf8($to, $subject = '(No subject)', $message = '', $from) { | |
$header = 'MIME-Version: 1.0' . "\n" . 'Content-type: text/plain; charset=UTF-8' | |
. "\n" . 'From: Yourname <' . $from . ">\n"; | |
return mail($to, '=?UTF-8?B?'.base64_encode($subject).'?=', $message, $header); | |
} | |
if(mail_utf8('[email protected]','123','123','[email protected]')) { | |
echo 'ok'; | |
} else { | |
echo 'false'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment