Skip to content

Instantly share code, notes, and snippets.

@ryanfitton
Last active January 1, 2016 20:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ryanfitton/8196163 to your computer and use it in GitHub Desktop.
Save ryanfitton/8196163 to your computer and use it in GitHub Desktop.
Example PHP Mail script
<?php
$to = "sendtoperson@domain.com";
$subject = "This is the email subject";
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1" . "\r\n";
$headers .= "From:<email@domain.com>" . "\r\n";
$headers .= "Reply-To:<sendbyperson@domain.com>" . "\r\n";
$headers .= "X-Mailer: PHP/" . phpversion();
$message = "This is the message";
mail($to, $subject, $message, $headers);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment