Skip to content

Instantly share code, notes, and snippets.

@MicahStevens
Last active August 29, 2015 14:07
Show Gist options
  • Save MicahStevens/2eb75b1451e6f8ea1cdc to your computer and use it in GitHub Desktop.
Save MicahStevens/2eb75b1451e6f8ea1cdc to your computer and use it in GitHub Desktop.
example php mail script (simple)
<?php
$sent = false;
if (isset($_POST['submit']))
{
$sent =mail('[email protected]', 'My Subject', $_POST['message']);
}
?>
<html>
<body>
<?php
if ($sent)
{
echo "<p>Email sent!</p>";
}
?>
<form method="POST">
<textarea name="message" />
<input type="submit" name="submit" value="send" />
</form>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment