Created
June 11, 2018 11:09
-
-
Save gravataLonga/5982574c97007732aefe17c78cdeeb22 to your computer and use it in GitHub Desktop.
Testing sending email
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
<?php | |
function mail_utf8( | |
$to_name, | |
$to, | |
$from_name, | |
$from, | |
$reply = '', | |
$subject = '(No subject)', | |
$message = '' | |
) | |
{ | |
$headers = "From: $from_name<$from>\r\n"; | |
$headers .= "To: $to_name<$to>\r\n"; | |
$headers .= "Reply-To: $reply\r\n"; | |
$headers .= "X-Mailer: PHPV0.1\n"; | |
$headers .= 'MIME-Version: 1.0' . "\n"; | |
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; | |
return mail($to, $subject, $message, $headers); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment