Skip to content

Instantly share code, notes, and snippets.

@lasse-it
Created December 6, 2015 13:16
Show Gist options
  • Save lasse-it/aca6220a203c7aabd6da to your computer and use it in GitHub Desktop.
Save lasse-it/aca6220a203c7aabd6da to your computer and use it in GitHub Desktop.
<?php
$usermail = $_POST['usermail'];
$username = $_POST['username'];
$userphone = $_POST['userphone'];
$message = "New user:\r\n Name: " . $username . "\r\n Mail: " . $usermail . "\r\n Phone: " . $userphone;
$to = 'interstellar@interstellar.com';
$from = 'php@interstellar.com';
$subject = 'New user';
$headers = $from . "\r\n" .
'Reply-To: ' . $from . "\r\n" .
'X-Mailer: PHP/' . phpversion();
if ($captcha == "valid") {
mail($to, $subject, $message, $headers);
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment