Created
December 10, 2010 09:39
-
-
Save juanramon/736021 to your computer and use it in GitHub Desktop.
Mail test
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 | |
$to = "mail@example.com"; | |
$header = "From: {$to}"; | |
$subject = "Hi!"; | |
$body = "Hi,\n\nHow are you?"; | |
if (mail($to, $subject, $body, $header)) { | |
echo("<p>Message successfully sent!</p>"); | |
} else { | |
echo("<p>Message delivery failed...</p>"); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment