Skip to content

Instantly share code, notes, and snippets.

@rioleo
Created October 10, 2012 03:03
Show Gist options
  • Save rioleo/3862916 to your computer and use it in GitHub Desktop.
Save rioleo/3862916 to your computer and use it in GitHub Desktop.
Email Script
function sendmail($email, $name, $title)
{
$to = $email;
$subject = 'Maya Order Confirmation';
$message = 'Hello '.$name.',<br /><br />This email is to confirm your order for the following book from Maya:<br /><br /><strong>'.$title.'</strong><br /><br />Please wait for the next update email which will contain shipping information.';
$headers = 'From: Maya Book Service <info@mayabooks.com>' . "\r\n" .
'MIME-Version: 1.0' . "\r\n" .
'Content-type: text/html; charset=iso-8859-1' . "\r\n" .
'Reply-To: Maya Book Service <mayabooks@mayabooks.com>' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment