php Mailer

6,518 views
6,374 views

Published on

php mailer

passwd: mailer

Published in: Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
6,518
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

php Mailer

  1. 1. <?php@session_start();$create_password = true;$password = base64_decode("bWFpbGVy");$pass=$_POST[pass];if($pass==$password){$_SESSION[mailer]="$pass";}if ($_SERVER["HTTP_CLIENT_IP"]) $ip = $_SERVER["HTTP_CLIENT_IP"];else if($_SERVER["HTTP_X_FORWARDED_FOR"]) $ip =$_SERVER["HTTP_X_FORWARDED_FOR"];else if($_SERVER["REMOTE_ADDR"]) $ip = $_SERVER["REMOTE_ADDR"];else $ip = $_SERVER[REMOTE_ADDR];$ip=htmlspecialchars($ip);if($create_password==true){if(!isset($_SESSION[mailer]) or $_SESSION[mailer]!=$password){die("<title>..:: Dukamu Bahagiaku ::..</title><META http-equiv="content-type" content="text/html;charset=iso-8859-1"><META content="mailer" name="author"><META name="rating" content="general" /><META http-equiv="pragma" content="cache" /><META http-equiv="cache-control" content="cache" /><META http-equiv="cache-control" content="must-revalidate" /><META http-equiv="cache-control" content="proxy-revalidate" /><META name="MSSmartTagsPreventParsing" content="true" /><META name="robots" content="all,index,follow" /><META name="googlebot" content="all,index,follow" /><META name="allow-search" content="yes" /><META name="audience" content="all" /><META name="revisit" content="2 days" /><META name="revisit-after" content="2 days" /><META name="author" content="mailer" /><META name="copyright" content="mailer" /><META name="creator" content="mailer" /><META name="generator" content="mailer" /><META http-equiv="Reply-to" content="g1xsystem@windowslive.com" /><META name="distribution" content="global" /><META name="classification" content="..:: Dukamu Bahagiaku ::.., Powered bymailer" /><META name="document-classification" content="general" /><META name="rating" content="general" /><meta name="description" content="..:: Dukamu Bahagiaku ::.. Powered bymailer" /><META content="index, follow" name="robots"><META content="..:: Dukamu Bahagiaku ::..,mailer" name="keywords"><META name="dc.title" content="..:: Dukamu Bahagiaku ::.." /><META name="dc.creator.e-mail" content="g1xsystem@windowslive.com" /><META name="dc.creator.name" content="mailer" /><body text="#FFFFFF" bgcolor="#000000" background="black"><br><br><br><br><br><br><br><br><br><br><br><center><table width=100 bgcolor="black" border=1 bordercolor="white"><tr><td><font size=1 face=verdana><center><b><font color=red>..:: mailer secure mail ::..</font></a><br><br></b></center><form method=post>Password:<br><input type=password name=pass size=30tabindex=1></form><font color=red><b>Host:</b> ".$_SERVER["HTTP_HOST"]."<br><font color=red><b>IP:</b> ".gethostbyname($_SERVER["HTTP_HOST"])."<br><font color=red><b>Your ip:</b> ".$ip."</td></tr></table>");}}if(isset($_POST[action] ) ){$action=$_POST[action];$message=$_POST[message];$emaillist=$_POST[emaillist];$from=$_POST[from];$replyto=$_POST[replyto];$subject=$_POST[subject];$realname=$_POST[realname];
  2. 2. $file_name=$_POST[file];$contenttype=$_POST[contenttype]; $message = urlencode($message); $message = ereg_replace("%5C%22", "%22", $message); $message = urldecode($message); $message = stripslashes($message); $subject = stripslashes($subject);}?><html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><style type="text/css"><!--.style1 { font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 12px;}--></style><style type="text/css"><!--.style1 { font-size: 20px; font-family: Geneva, Arial, Helvetica, sans-serif;}--></style></head><body bgcolor="#006699" text="#ffffff"><span class="style1"><center>| + | Mailer Inbox | + |</center><br></span></p><form name="form1" method="post" action="" enctype="multipart/form-data"> <input type="hidden" name="action" value="send"> <br> <table width="100%" border="0"> <tr> <td width="10%"> <div align="right"><font size="-3" face="Verdana, Arial, Helvetica,sans-serif">Email:</font></div> </td> <td width="18%"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif"> <input type="text" name="from" value="<? print $from; ?>"size="30"> </font></td> <td width="31%"> <div align="right"><font size="-3" face="Verdana, Arial, Helvetica,sans-serif">Nama:</font></div> </td> <td width="41%"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif"> <input type="text" name="realname" value="<? print $realname; ?>"size="30"> </font></td> </tr> <tr> <td width="10%"> <div align="right"><font size="-3" face="Verdana, Arial, Helvetica,sans-serif">Reply:</font></div> </td>
  3. 3. <td width="18%"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif"> <input type="text" name="replyto" value="<? print $replyto; ?>"size="30"> </font></td> <td width="31%"> <div align="right"><font size="-3" face="Verdana, Arial, Helvetica,sans-serif">Attach File:</font></div> </td> <td width="41%"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif"> <input type="file" name="file" size="30"> </font></td> </tr> <tr> <td width="10%"> <div align="right"><font size="-3" face="Verdana, Arial, Helvetica,sans-serif">Subject:</font></div> </td> <td colspan="3"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif"> <input type="text" name="subject" value="<? print $subject; ?>"size="109"> </font></td> </tr> <tr> <td width="10%" valign="top"> <div align="right"><font size="-3" face="Verdana, Arial, Helvetica,sans-serif">Mail:</font></div> </td> <td width="18%" valign="top"><font size="-3" face="Verdana, Arial,Helvetica,sans-serif"> <textarea name="message" cols="50" rows="10"><? print $message; ?></textarea> <br> <input type="radio" name="contenttype" value="plain"> Text <input name="contenttype" type="radio" value="html" checked> HTML <input type="submit" value="Send to Inbox"> </font></td> <td width="31%" valign="top"> <div align="right"> <font face="Verdana, Arial,Helvetica, sans-serif" size="-3">Mail to:</font></div> </td> <td width="41%" valign="top"><font size="-3" face="Verdana, Arial,Helvetica, sans-serif"> <textarea name="emaillist" cols="30" rows="10"><? print $emaillist; ?></textarea></font></td> </tr> </table></form><?if ($action){ if (!$from && !$subject && !$message && !$emaillist){ print "Please complete all fields before sending your message."; exit; } $allemails = split("n", $emaillist); $numemails = count($allemails);
  4. 4. for($x=0; $x<$numemails; $x++){ $to = $allemails[$x]; if ($to){ $to = ereg_replace(" ", "", $to); $message = ereg_replace("&email&", $to, $message); $subject = ereg_replace("&email&", $to, $subject); print " $to......."; flush(); $header = "From: $realname <$from>rnReply-To: $replytorn"; $header .= "MIME-Version: 1.0rn"; If ($file_name) $header .= "Content-Type: multipart/mixed;boundary=$uidrn"; If ($file_name) $header .= "--$uidrn"; $header .= "Content-Type: text/$contenttypern"; $header .= "Content-Transfer-Encoding: 8bitrnrn"; $header .= "$messagern"; If ($file_name) $header .= "--$uidrn"; If ($file_name) $header .= "Content-Type: $file_type;name="$file_name"rn"; If ($file_name) $header .= "Content-Transfer-Encoding:base64rn"; If ($file_name) $header .= "Content-Disposition: attachment;filename="$file_name"rnrn"; If ($file_name) $header .= "$contentrn"; If ($file_name) $header .= "--$uid--"; mail($to, $subject, "", $header); print "Terkirim<br>"; flush(); } }}?><style type="text/css"><!--.style1 { font-size: 20px; font-family: Geneva, Arial, Helvetica, sans-serif;}--></style><center><p class="style1">Copyright © 2009 eidelweiss.info</center></p><?phpif(isset($_POST[action]) && $numemails !==0 ){echo"<script>alert(Semua Email telah dikirimrnTotal Email terkirim$numemailsrnKlik OK n say mailer ok);</script>";}?></body></html>

×