Shadowhunters

The Fake Mailer Script

Sep 27th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.30 KB | None | 0 0
  1. <html>
  2. <head>
  3. <meta http-equiv="author" content="The Alchemist"/>
  4. <title>
  5. The Fake Mailer Script
  6. </title>
  7. </head>
  8. <body background="http://fc00.deviantart.net/fs70/i/2011/324/9/2/black___purple_textures_by_paralyzinglove-d4gscvx.jpg">
  9. <p align=center>
  10. <img src="http://i67.photobucket.com/albums/h298/bcfcrule11/theAlchemist.png" alt="The Fake Mailer Script" /></p>
  11. <form name="fakemail" action="<?php $PHP_SELF; ?>" method="POST">
  12. <p><label for="fname"><b><font size="5" color=c0c0c0>From name :</b></font></label><br>
  13. <input name="fname" id="fname" type="text" class="formbox" /><br></p>
  14. <p><label for="femail"><font size="5" color=c0c0c0>From email id :</font></label><br>
  15. <input name="femail" id="femail" type="text" class="formbox" /><br></p>
  16. <p><label for="to"><font size="5" color=c0c0c0>To :</font></label><br>
  17. <input name="to" id="to" type="text" class="formbox"/><br></p>
  18. <p><label for="subject"><font size="5" color=c0c0c0>Subject :</font></label><br>
  19. <input name="subject" id="subject" type="text" class="formbox"/><br></p>
  20. <p><label for="message"><font size="5" color=c0c0c0>Message :</font></label><br>
  21. <textarea name="message" id="message" cols="60" rows="8"></textarea></p>
  22. <p><input name="submit" id="submit" type="submit" value="Send!!" /></p></form>
  23. <?php
  24. send_email($to=null,$subject=null,$from_name=null,$from_mail=null,$mail_content=null,$replyto=null)
  25. {
  26. $headers = "From: \"".$from_name."\" <".$from_mail.">\r\nReply-To: ".$replyto."\r\n";//here's the main part
  27. if(@mail($to,$subject,$mail_content,$headers))
  28. {
  29. $mail_send_result="<p><font size=4 color=#c0c0c0>Email successfully sent to $to.!!</font></p>";//If mail gets sent successfully
  30. }
  31. else
  32. {
  33. $mail_send_result="<p><font size=4 color=#c0c0c0>Email NOT sent to $to.</font></p>";//If mail does not get sent
  34. }
  35. return $mail_send_result;
  36. }
  37. if(isset($_POST['to']) && isset($_POST['fname']) && isset($_POST['femail'])
  38. && isset($_POST['message']) && isset($_POST['subject']) && isset($_POST['submit']))
  39. {
  40. $from_name=$_POST['fname'];
  41. $from_mail=$_POST['femail'];
  42. $mail_content=$_POST['message'];
  43. $to=$_POST['to'];
  44. $subject=$_POST['subject'];
  45. $replyto=$_POST['femail'];
  46. echo send_email($to,$subject,$from_name,$from_mail,$mail_content,$replyto);
  47. }
  48. ?>
  49. </body>
  50. </html>
Add Comment
Please, Sign In to add comment