1 2 3 4 5 6 7 8 9 10 11 12 |
<html> <form method='post' action='mailform.php'> Email: <input name='email' type='text'><br> Subject: <input name='subject' type='text'><br> Message:<br> <textarea name='message' rows='15' cols='40'> </textarea><br> <input type='submit'> </form> </html> |
mailform.php
1 2 3 4 5 6 7 8 9 10 11 |
<?php $subject = "Test mail"; $message = "Hello! This is a simple email message."; $headers = "From:" . $from; mail($to,$subject,$message,$headers); echo "Mail Sent."; ?> |