Last active
January 1, 2016 20:19
-
-
Save ryanfitton/8196163 to your computer and use it in GitHub Desktop.
Example PHP Mail script
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 = "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