Skip to content

Instantly share code, notes, and snippets.

@rnarian
Last active December 21, 2015 22:59
Show Gist options
  • Save rnarian/6379542 to your computer and use it in GitHub Desktop.
Save rnarian/6379542 to your computer and use it in GitHub Desktop.
Testing html mails like a boss! Call: mailtest.php?mail=receiver.mail@host.com
<?php
$mail = $_GET['mail'];
$message = file_get_contents("mail.html");
$header = "MIME-Version: 1.0\n";
$header .= "Content-type: text/html; charset=utf-8\n";
$header .= "From: Marian Friedmann <marian.friedmann@gmail.com>\n";
mail($mail,"Mail Test", $message, $header);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment