Advertisement
alin_tamvanz

mailer

Feb 24th, 2016
261
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.71 KB | None | 0 0
  1. <?php
  2. echo'
  3. <html>
  4. <head>
  5. <title>Mailer ~ shutdown57 </title>
  6. <meta name="viewport" content="width=device-width,initial-scale=1">
  7. </head>
  8. <body>
  9. <h1> PHP Mailer <small> Coded by shutdown57 </small></h1>
  10. <form method="post">
  11. <input type="text" name="nama" placeholder="nama anda" id="s57">
  12. <br>
  13. <input type="email" name="email" placeholder="[email protected]" id="s57">
  14. <br>
  15. <input type="text" name="sabjek" placeholder="subject" id="s57">
  16. <br>
  17. <textarea name="pesan" >
  18. Message here
  19. </textarea>
  20. <br>
  21. <input type="submit" value="kirim!" name="kirim" id="buton">
  22. </form>
  23. </body>
  24. </html>
  25. ';
  26. if(!empty($_POST['kirim'])){
  27. $name=$_POST['nama'];
  28. $email=$_POST['email'];
  29. $subject=$_POST['sabjek'];
  30. $message=$_POST['pesan'];
  31.  
  32. $to=$email;
  33.  
  34. $message="From:$name <br />".$message;
  35.  
  36. $headers = "MIME-Version: 1.0" . "\r\n";
  37. $headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
  38.  
  39.  
  40. $headers .= 'From: WithOutShadow <[email protected]>'."\r\n" . 'Reply-To: '.$name.' <'.$email.'>'."\r\n";
  41. $headers .= 'Cc: [email protected]' . "\r\n";
  42.  
  43. @mail($to,$subject,$message,$headers);
  44. if(@mail)
  45. {
  46. echo "<br>Berhasil Mengirim Email !";  
  47. }else{echo'gagal mengirim email,mungkin ada form yang belum anda isi';}
  48. }
  49. ?>
  50. <style>
  51. body{
  52. background:#eee;
  53. color:#007DFF;
  54. }
  55. form{
  56. width:100%;}
  57. #s57{
  58. color:#ff0003;
  59. background:#333;
  60. border:0;
  61. border-radius:5px;
  62. width:100%;
  63. height:30px;
  64. font-size:20px;
  65. margin-bottom:4px;
  66. }
  67. #buton{
  68. width:60%;
  69. height:30px;
  70. color:#eee;
  71. background:#ff0003;
  72. border:0;
  73. border-radius:4px;
  74. box-shadow:0px 0px 8px #333;
  75. margin-top:5px;
  76. position:absolute;
  77. }
  78. textarea{
  79. width:100%;
  80. height:100px;
  81. color:#3700FF;
  82. background:transparent;
  83. text-decoration:bold;
  84. }
  85. </style>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement