Skip to content

Instantly share code, notes, and snippets.

@johnathan-sewell
Created September 8, 2011 09:04
Show Gist options
  • Save johnathan-sewell/1202982 to your computer and use it in GitHub Desktop.
Save johnathan-sewell/1202982 to your computer and use it in GitHub Desktop.
Send an email in PHP
<?php
$to ="[email protected]";
$subject = "PHP Mail Test";
$message = "This is a PHP mail test";
$headers = 'From: [email protected]' . "\r\n" .
'Reply-To: [email protected]' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
$success = mail($to ,$subject ,$message, $headers);
print("mail sending result:" + $success);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment