Skip to content

Instantly share code, notes, and snippets.

@juanramon
Created December 10, 2010 09:39
Show Gist options
  • Save juanramon/736021 to your computer and use it in GitHub Desktop.
Save juanramon/736021 to your computer and use it in GitHub Desktop.
Mail test
<?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