Skip to content

Instantly share code, notes, and snippets.

@johannez
Created January 14, 2014 01:11
Show Gist options
  • Save johannez/8411226 to your computer and use it in GitHub Desktop.
Save johannez/8411226 to your computer and use it in GitHub Desktop.
<?php
$to = "[email protected]";
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";
$headers = "From: [email protected]\r\n" .
"X-Mailer: php";
if (mail($to, $subject, $body, $headers)) {
echo("<p>Message 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