Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <body>
- <?php
- if (isset($_REQUEST['subject']))
- //if "email" is filled out, send email
- {
- //send email
- $to = $_REQUEST['to'] ;
- $subject = $_REQUEST['subject'] ;
- $message = $_REQUEST['message'] ;
- mail( "$to", "Re: $subject",
- $message, "From: admin@albinowasp.com" );
- echo "Email has been sent.";
- }
- else
- //if "email" is not filled out, display the form
- {
- echo "<form method='post' action='sendmyemail.php'>
- To: <input name='to' 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>";
- }
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement