Skip to content

Instantly share code, notes, and snippets.

@flexgrip
Created June 14, 2012 00:04
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save flexgrip/2927236 to your computer and use it in GitHub Desktop.
Save flexgrip/2927236 to your computer and use it in GitHub Desktop.
simple mail script
<?php
$to = "jmayer@mayernetworks.com";
$subject = "Test mail";
$message = "Hello! This is a simple email message.";
$from = "someonelse@example.com";
$headers = "From:" . $from;
if(mail($to,$subject,$message,$headers)) {
echo "Mail Sent.";
} else {
echo "Mail not sent.";
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment