Skip to content

Instantly share code, notes, and snippets.

@r37r0m0d3l
Created September 12, 2012 12:21
Show Gist options
  • Save r37r0m0d3l/3706268 to your computer and use it in GitHub Desktop.
Save r37r0m0d3l/3706268 to your computer and use it in GitHub Desktop.
Mail as html
<?php
function mail($to, $person, $subject, $message, $from_name, $from_mail)
{
$headers = 'MIME-Version: 1.0'."\r\n";
$headers .= 'Content-type: text/html; charset=utf-8'."\r\n";
$headers .= 'To: '.$person.' <'.$to.'>'."\r\n";
$headers .= 'From: '.$from_name.' <'.$from_mail.'>'."\r\n";
return mail($to, $subject, $message, $headers);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment