Skip to content

Instantly share code, notes, and snippets.

@ezos86
Created August 6, 2013 05:27
Show Gist options
  • Save ezos86/6162244 to your computer and use it in GitHub Desktop.
Save ezos86/6162244 to your computer and use it in GitHub Desktop.
PHP Mail Example
<?php
$name = $_POST['feedback-name'];
$email = $_POST['feedback-email'];
$message = $_POST['feedback-box'];
$to = '[email protected]';
$subject = 'QPME Feedback From Customer Terminal';
$headers = 'From: [email protected]' . "\r\n" .
'Reply-To: [email protected]' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);
?>
<form style="margin-left:10px; margin-top:20px;" method="post" action="mail-funciton.php">
<label for="feedback-name" style="margin-top:20px;">Name:</label>
<input class="input-box" name="feedback-name" value=""/>
<label for="feedback-email" style="margin-top:20px;">Email Address:</label>
<input class="input-box" type="email" name="feedback-email" value=""/>
<label for="feedback-box" style="margin-top:20px;">Enter your feedback:</label>
<textarea style="display:block; width: 508px; height:200px; border:1px solid #ccc; padding:3px;" name="feedback-box" id="feedback-box"></textarea>
<input style="margin-top:20px;" class="btn btn-inverse" type="submit">
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment