Advertisement
rhiby

php mailer

Feb 12th, 2012
345
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.77 KB | None | 0 0
  1. <?php
  2. @session_start();
  3. $create_password = true;
  4. $password = base64_decode("bWFpbGVy");$pass=$_POST['pass'];if($pass==$password){$_SESSION['mailer']="$pass";}
  5. if ($_SERVER["HTTP_CLIENT_IP"]) $ip = $_SERVER["HTTP_CLIENT_IP"];
  6. else if($_SERVER["HTTP_X_FORWARDED_FOR"]) $ip = $_SERVER["HTTP_X_FORWARDED_FOR"];
  7. else if($_SERVER["REMOTE_ADDR"]) $ip = $_SERVER["REMOTE_ADDR"];
  8. else $ip = $_SERVER['REMOTE_ADDR'];
  9. $ip=htmlspecialchars($ip);
  10. if($create_password==true){
  11. if(!isset($_SESSION['mailer']) or $_SESSION['mailer']!=$password){
  12. die("<title>..:: Dukamu Bahagiaku ::..</title>
  13. <META http-equiv=\"content-type\" content=\"text/html;charset=iso-8859-1\">
  14. <META content=\"mailer\" name=\"author\">
  15. <META name=\"rating\" content=\"general\" />
  16. <META http-equiv=\"pragma\" content=\"cache\" />
  17. <META http-equiv=\"cache-control\" content=\"cache\" />
  18. <META http-equiv=\"cache-control\" content=\"must-revalidate\" />
  19. <META http-equiv=\"cache-control\" content=\"proxy-revalidate\" />
  20. <META name=\"MSSmartTagsPreventParsing\" content=\"true\" />
  21. <META name=\"robots\" content=\"all,index,follow\" />
  22. <META name=\"googlebot\" content=\"all,index,follow\" />
  23. <META name=\"allow-search\" content=\"yes\" />
  24. <META name=\"audience\" content=\"all\" />
  25. <META name=\"revisit\" content=\"2 days\" />
  26. <META name=\"revisit-after\" content=\"2 days\" />
  27. <META name=\"author\" content=\"mailer\" />
  28. <META name=\"copyright\" content=\"mailer\" />
  29. <META name=\"creator\" content=\"mailer\" />
  30. <META name=\"generator\" content=\"mailer\" />
  31. <META http-equiv=\"Reply-to\" content=\"eidelweiss@windowslive.com\" />
  32. <META name=\"distribution\" content=\"global\" />
  33. <META name=\"classification\" content=\"..:: Dukamu Bahagiaku ::.., Powered by mailer\" />
  34. <META name=\"document-classification\" content=\"general\" />
  35. <META name=\"rating\" content=\"general\" />
  36. <meta name=\"description\" content=\"..:: Dukamu Bahagiaku ::.. Powered by mailer\" />
  37. <META content=\"index, follow\" name=\"robots\">
  38. <META content=\"..:: Dukamu Bahagiaku ::..,mailer\" name=\"keywords\">
  39. <META name=\"dc.title\" content=\"..:: Dukamu Bahagiaku ::..\" />
  40. <META name=\"dc.creator.e-mail\" content=\"eidelweiss@windowslive.com\" />
  41. <META name=\"dc.creator.name\" content=\"mailer\" />
  42. <body text=\"#FFFFFF\" bgcolor=\"#000000\" background=\"black\">
  43. <br><br><br><br><br><br><br><br><br><br><br><center>
  44. <table width=100 bgcolor=\"black\" border=1 bordercolor=\"white\"><tr><td>
  45. <font size=1 face=verdana><center><b><font color=red>
  46. ..:: mailer secure mail ::..</font></a><br><br></b></center>
  47. <form method=post>Password:<br><input type=password name=pass size=30 tabindex=1>
  48. </form><font color=red><b>Host:</b> ".$_SERVER["HTTP_HOST"]."<br>
  49. <font color=red><b>IP:</b> ".gethostbyname($_SERVER["HTTP_HOST"])."<br>
  50. <font color=red><b>Your ip:</b> ".$ip."</td></tr></table>");}}
  51.  
  52. if(isset($_POST['action'] ) ){
  53. $action=$_POST['action'];
  54. $message=$_POST['message'];
  55. $emaillist=$_POST['emaillist'];
  56. $from=$_POST['from'];
  57. $replyto=$_POST['replyto'];
  58. $subject=$_POST['subject'];
  59. $realname=$_POST['realname'];
  60. $file_name=$_POST['file'];
  61. $contenttype=$_POST['contenttype'];
  62.  
  63. $message = urlencode($message);
  64. $message = ereg_replace("%5C%22", "%22", $message);
  65. $message = urldecode($message);
  66. $message = stripslashes($message);
  67. $subject = stripslashes($subject);
  68. }
  69. ?>
  70. <html>
  71. <head>
  72. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  73. <style type="text/css">
  74. <!--
  75. .style1 {
  76. font-family: Geneva, Arial, Helvetica, sans-serif;
  77. font-size: 12px;
  78. }
  79. -->
  80. </style>
  81. <style type="text/css">
  82. <!--
  83. .style1 {
  84. font-size: 20px;
  85. font-family: Geneva, Arial, Helvetica, sans-serif;
  86. }
  87. -->
  88. </style>
  89. </head>
  90. <body bgcolor="#006699" text="#ffffff">
  91. <span class="style1"><center>
  92. | + | Mailer Inbox | + |
  93. </center>
  94. <br></span></p>
  95. <form name="form1" method="post" action="" enctype="multipart/form-data">
  96. <input type="hidden" name="action" value="send">
  97. <br>
  98. <table width="100%" border="0">
  99. <tr>
  100. <td width="10%">
  101. <div align="right"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif">Email:</font></div>
  102. </td>
  103. <td width="18%"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif">
  104. <input type="text" name="from" value="<? print $from; ?>"
  105. size="30">
  106. </font></td>
  107. <td width="31%">
  108. <div align="right"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif">Nama:</font></div>
  109. </td>
  110. <td width="41%"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif">
  111. <input type="text" name="realname" value="<? print $realname; ?>" size="30">
  112. </font></td>
  113. </tr>
  114. <tr>
  115. <td width="10%">
  116. <div align="right"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif">Reply:</font></div>
  117. </td>
  118. <td width="18%"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif">
  119. <input type="text" name="replyto" value="<? print $replyto; ?>" size="30">
  120. </font></td>
  121. <td width="31%">
  122. <div align="right"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif">Attach
  123. File:</font></div>
  124. </td>
  125. <td width="41%"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif">
  126. <input type="file" name="file" size="30">
  127. </font></td>
  128. </tr>
  129. <tr>
  130. <td width="10%">
  131. <div align="right"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif">Subject:</font></div>
  132. </td>
  133. <td colspan="3"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif">
  134. <input type="text" name="subject" value="<? print $subject; ?>" size="109">
  135. </font></td>
  136. </tr>
  137. <tr>
  138. <td width="10%" valign="top">
  139. <div align="right"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif">Mail:</font></div>
  140. </td>
  141. <td width="18%" valign="top"><font size="-3" face="Verdana, Arial, Helvetica,
  142. sans-serif">
  143. <textarea name="message" cols="50" rows="10"><? print $message; ?></textarea>
  144. <br>
  145. <input type="radio" name="contenttype" value="plain">
  146. Text
  147. <input name="contenttype" type="radio" value="html" checked>
  148. HTML
  149. <input type="submit" value="Send to Inbox">
  150. </font></td>
  151. <td width="31%" valign="top">
  152. <div align="right">
  153. <font face="Verdana, Arial,
  154. Helvetica, sans-serif" size="-3">Mail to:</font></div>
  155. </td>
  156. <td width="41%" valign="top"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif">
  157. <textarea name="emaillist" cols="30" rows="10"><? print $emaillist; ?></textarea></font></td>
  158. </tr>
  159. </table>
  160. </form>
  161. <?
  162. if ($action){
  163. if (!$from && !$subject && !$message && !$emaillist){
  164. print "Please complete all fields before sending your message.";
  165. exit;
  166. }
  167. $allemails = split("\n", $emaillist);
  168. $numemails = count($allemails);
  169.  
  170. for($x=0; $x<$numemails; $x++){
  171. $to = $allemails[$x];
  172. if ($to){
  173. $to = ereg_replace(" ", "", $to);
  174. $message = ereg_replace("&email&", $to, $message);
  175. $subject = ereg_replace("&email&", $to, $subject);
  176. print " $to.......";
  177. flush();
  178. $header = "From: $realname <$from>\r\nReply-To: $replyto\r\n";
  179. $header .= "MIME-Version: 1.0\r\n";
  180. If ($file_name) $header .= "Content-Type: multipart/mixed; boundary=$uid\r\n";
  181. If ($file_name) $header .= "--$uid\r\n";
  182. $header .= "Content-Type: text/$contenttype\r\n";
  183. $header .= "Content-Transfer-Encoding: 8bit\r\n\r\n";
  184. $header .= "$message\r\n";
  185. If ($file_name) $header .= "--$uid\r\n";
  186. If ($file_name) $header .= "Content-Type: $file_type; name=\"$file_name\"\r\n";
  187. If ($file_name) $header .= "Content-Transfer-Encoding: base64\r\n";
  188. If ($file_name) $header .= "Content-Disposition: attachment; filename=\"$file_name\"\r\n\r\n";
  189. If ($file_name) $header .= "$content\r\n";
  190. If ($file_name) $header .= "--$uid--";
  191. mail($to, $subject, "", $header);
  192. print "Terkirim<br>";
  193. flush();
  194. }
  195. }
  196. }
  197.  
  198.  
  199. ?>
  200. <style type="text/css">
  201. <!--
  202. .style1 {
  203. font-size: 20px;
  204. font-family: Geneva, Arial, Helvetica, sans-serif;
  205. }
  206. -->
  207. </style><center>
  208. <p class="style1">Copyright © 2009 eidelweiss.info</center></p>
  209. <?php
  210. if(isset($_POST['action']) && $numemails !==0 ){echo
  211. "<script>alert('Semua Email telah dikirim\\r\\nTotal Email terkirim $numemails\\r\\nKlik OK n say mailer ok');
  212. </script>";}
  213. ?>
  214. </body>
  215. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement