Skip to content

Instantly share code, notes, and snippets.

@sdeluce
Last active January 4, 2016 01:28
Show Gist options
  • Select an option

  • Save sdeluce/8548208 to your computer and use it in GitHub Desktop.

Select an option

Save sdeluce/8548208 to your computer and use it in GitHub Desktop.
Envoyer un mail function PHP
<?php
$to = "[email protected]";
$subject = "VIRALPATEL.net";
$body = "Body of your message here you can use HTML too. e.g. <br> <b> Bold </b>";
$headers = "From: Peter\r\n";
$headers .= "Reply-To: [email protected]\r\n";
$headers .= "Return-Path: [email protected]\r\n";
$headers .= "X-Mailer: PHP5\n";
$headers .= 'MIME-Version: 1.0' . "\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
mail($to,$subject,$body,$headers);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment