Skip to content

Instantly share code, notes, and snippets.

@sptrsn
Created December 16, 2013 22:45
Show Gist options
  • Save sptrsn/7995883 to your computer and use it in GitHub Desktop.
Save sptrsn/7995883 to your computer and use it in GitHub Desktop.
mail()
<?
$to = "";
$from = ""
$reply-to = "";
$return-path = ""
$cc = "";
$bcc = "";
$subject = "";
$msg = "";
$msg = base64_encode( $msg );
$msg = chunk_split( base64_encode( $msg ) );
$headers = "From: ".$from." \r\n";
$headers .= "Reply-To: ".$reply-to." \r\n";
$headers .= "CC: ".$cc." \r\n";
$headers .= "Bcc: ".$bcc." \r\n";
$headers .= "Return-Path: ".$return-path." \r\n";
$headers .= "x-mailer: php/" . phpversion();
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "Content-transfer-encoding: base64\r\n";
$headers .= "\r\n";
$additionalParameters = "-ODeliveryMode=d";
mail($to,$subject,$msg,$headers,$additionalParameters);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment