nil_007

fakeemailsender

Nov 12th, 2018
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <html>
  2. <head>
  3. <title>E-mail sender</title>
  4. <style type='text/css'>
  5. body
  6. {
  7. color:white;
  8.  
  9. background-image:url('http://qfi.im/style/bg.png');
  10. font-family:comic sans ms;
  11. text-align:center;
  12. }
  13. .information
  14. {
  15. background:#171717;
  16. border-color:#E7E7E7;
  17. border-style:solid;
  18. border-width:1px;
  19. font-weight:bold;
  20. font-size:14px;
  21. }
  22. </style>
  23. </head>
  24. <body>
  25. <div class='information'>
  26. <form method='POST'>
  27. <table align='center'>
  28. <tr><td>To (email):</td><td> <input type='text' name='to'>
  29. <tr><td>From (name):</td><td> <input type='text' name='fromn'>
  30. <tr><td>From (email):</td><td> <input type='text' name='frome'>
  31. <tr><td>Subject:</td><td> <input type='text' name='subject'>
  32. <tr><td>Message:</td><td><textarea name='message' cols='35' rows='10'></textarea>
  33. <tr><td><input type='reset' value='Reset fields' name='reset'><td><input type='submit' value='Send e-mail' name='send'></td><td>
  34. </table>
  35. </form>
  36. </div>
  37. <?php
  38.  
  39. if(isset($_POST['send']))
  40. {
  41. // variables
  42. $to = htmlentities(stripslashes($_POST['to']));
  43. $fromn = htmlentities(stripslashes($_POST['fromn']));
  44. $frome = htmlentities(stripslashes($_POST['frome']));
  45. $subject = htmlentities(stripslashes($_POST['subject']));
  46. $message = htmlentities(stripslashes($_POST['message']));
  47. $headers = "From: $fromn <$frome>";
  48. // variables
  49. if($to && $fromn && $frome && $subject && $message && $headers) {
  50. mail($to, $subject, $message, $headers);
  51. echo "E-mail successfully sent to: ", $to;
  52. }
  53. }
  54. ?>
  55. </body>
  56. </html>
Add Comment
Please, Sign In to add comment