Created
March 7, 2015 17:34
-
-
Save FelisPhasma/2a11a73512d4995d31b1 to your computer and use it in GitHub Desktop.
testing php's mail function
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
<?php | |
# http://learn.koding.com/guides/enable-php-mail-function/ | |
$to = '[email protected]'; | |
$subject = 'the subject'; | |
$message = 'hello'; | |
$headers = 'From: [email protected]' . "\r\n" . | |
'Reply-To: [email protected]' . "\r\n" . | |
'X-Mailer: PHP/' . phpversion(); | |
mail($to, $subject, $message, $headers); | |
echo "Mail sent"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, I had tried the same without the $headers. It worked fine. I will have to check with a custom head and try further.