Created
May 8, 2014 14:48
-
-
Save woffleloffle/c1aea97a0ca2c920bb90 to your computer and use it in GitHub Desktop.
Super simple HTML mailer sender in PHP
This file contains hidden or 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 | |
/** | |
* Basic mailer. | |
* @author Willem Labu | |
* | |
* | |
*/ | |
// Edit this: | |
$to = "[email protected]"; // comma-separate email addresses for multiple receivers. | |
$subject = "Cunning Linguistics"; | |
// Paste HTML mailer here, and remember to | |
// escape single quotes with a backslash: 'and then it\'s good to go!' | |
$message = ''; | |
/** | |
* The rest. | |
* Edit this once, and forget. | |
*/ | |
$from = "[email protected]"; | |
$headers = "From: Me <" . strip_tags($from) . ">\r\n"; | |
$headers .= "Reply-To: noreply <[email protected]>". "\r\n"; | |
# $headers .= "CC: [email protected]\r\n"; | |
$headers .= "MIME-Version: 1.0\r\n"; | |
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n"; | |
// Send the mail | |
@mail ($to, $subject, $message, $headers); | |
// Auto EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment