Skip to content

Instantly share code, notes, and snippets.

@yvan-sraka
Created October 21, 2016 10:01
Show Gist options
  • Save yvan-sraka/990dfa712c56aff3441d38d39eb05052 to your computer and use it in GitHub Desktop.
Save yvan-sraka/990dfa712c56aff3441d38d39eb05052 to your computer and use it in GitHub Desktop.
<?php
if ($_POST) {
if (mail($_POST["email"], $_POST["subject"], $_POST ["message"])) {
echo "Sucess: Mail send!";
} else {
echo "Failure: Mail not send..";
}
}
?>
<!DOCTYPE html>
<head>
<meta charset="utf8"/>
<title>PHP Send Mail Form</title>
</head>
<body>
<form action="" method="POST">
<label for="email">Email</label>
<input id="email" name="email"/>
<label for="subject">Subject</label>
<input id="subject" name="subject"/>
<label for="message">Message</label>
<input id="message" name="message"/>
<input id="send" value="send" type="submit"/>
</form>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment