User:Hmwordock53/mail.php
Appearance
<nowiki> <?php if ($to) { // There's a to address $headers = 'From: ' . $from . "\r\n" . 'Reply-To: ' . $from . "\r\n" . 'X-Mailer: PHP/' . phpversion(); // Add the from, reply to and X Mailer in the header $message = wordwrap($message, 70); // Each line in message to be sent must be under 70 charcters in length $message = stripslashes($messages); // Strip off the backslashes(\" becomes "). mail($to, $subject, $message, $headers); // Send the mail, Use // mail($to, $subject, $message . "\n\nNote: This has been sent from a PHP page and we are not resposible for the contents of this message. A response can be sent to " . $from . " if necessary.", $headers); // if you feel it necessary. } ?> <html> <title>Mailman</title> <body bgcolor="#eeffee"> <form action="<?php echo $PHP_SELF; ?>" method="post"> <big>Mail Form</big> <br> From:<input type=text name="from"> <br> To:<input type=text name="to"> <br> Subject:<input type=text name="subject"> <br> Message:<br><textarea name="message" rows=20 cols=70></textarea> <br> <input type=submit value="Send"> </form> <pre> <?php echo $message; ?>
</body>
</html>
</nowiki>