This has already been answered here, but the result of the email is just a plain text version of the html.
I have a file called email.html.
This is the code I've used:
<?php
if (!isset($_POST["submit"]))
{
?>
<form>
<input class="button" type="submit" name="submit" value="Submit">
</form>
<?php
}
else
{
if (isset($_POST["from"]))
{
$email_text = file_get_contents('template.html');
$headers = "From:my.email@domain.com";
mail('another@email.com', 'Hi', $email_text, $headers);
}
}
?>