Skip to content

Instantly share code, notes, and snippets.

@bouassaba
Created December 18, 2014 12:03
Show Gist options
  • Save bouassaba/ea738310d40dea225b38 to your computer and use it in GitHub Desktop.
Save bouassaba/ea738310d40dea225b38 to your computer and use it in GitHub Desktop.
PHP send HTML Email
$to = '[email protected]';
$subject = 'Website Change Request';
$headers = "From: " . strip_tags($_POST['req-email']) . "\r\n";
$headers .= "Reply-To: ". strip_tags($_POST['req-email']) . "\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";
mail($to, $subject, $message, $headers);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment