One Hat Cyber Team
Your IP :
216.73.216.84
Server IP :
50.6.229.107
Server :
Linux server.hostburly.com 5.14.0-611.38.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Mar 10 17:21:28 EDT 2026 x86_64
Server Software :
Apache
PHP Version :
8.2.30
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
andjemzt
/
nportal.andjemztech.com
/
membership
/
View File Name :
bulk_mail.php
<?php ini_set('display_errors',1); require_once "Mail.php"; // PEAR Mail package require_once ('Mail/mime.php'); // PEAR Mail_Mime packge mysql_connect("localhost","niqsorgn_portal","@Xchange69!"); mysql_select_db("niqsorgn_pota1969"); $sql=mysql_query("SELECT * FROM members a WHERE a.sent !='6' AND a.memberEmail!='' ORDER BY a.memberID ASC LIMIT 0,500"); if(!$sql){ echo mysql_error(); } while ($row=mysql_fetch_array($sql)){ $memNo=$row['memberNo']; $name=$row['memberSurname']." ".$row['memberOthernames']; $date=date('Y-m-d'); $email=$row['memberEmail']; //$email = filter_var($email, FILTER_SANITIZE_EMAIL); $total=$row['outstanding']+$row['annualSub']+$advance+$upgradeCharge+$row['annualSub2017']+$row['devtLevy1']; /*$html='Dear Member,<br/><br/>Our attention has been drawn to a scam e-mail in the name of the Institute but with a different e-mail address viz: wenvola002@yahoo.com requesting members to complete a certain Form.<br/><br/>You are hereby advised not to open the message and for the safety of your system, do not open the attachment.<br/><br/>In case you have already completed the Form, please change your email password immediately.<br/><br/>For emphasis, please note that mails from the Institute emanate only from the official e-mail addresses, i.e. info@niqs.org.ng and mails.niqs@gmail.com respectively.<br/><br/>Thank you.<br/><br/>M. ABBA TOR, FNIQS, MNIMN, RQS<br/>Secretary General.'; */ $html ='Dear members,<br/><br/>Please be reminded that the following international programmes of interest are coming up later in the year.<br/><br/> (a) CASLE International Conference. 10th & 11th August, 2017, Dar Es Salaam, Tanzania.<br/>(b) AAQS General Assembly, 24th to 27th October 2017, Nairobi, Kenya.<br/>(c) Big 5, East Africa Expo, 1st to 3rd November, Nairobi, Kenya.<br/><br/>Interested members are please requested to contact the Secretariat for further details<br/><br/>Taridouye Gagariga, FNIQS<br/>Sec Int. Affairs.'; $fmail = filter_var(strbefore($email,','), FILTER_SANITIZE_EMAIL); $smail = filter_var(strafter($email,','), FILTER_SANITIZE_EMAIL); $email=""; if (strcmp($fmail,$smail) === 0){ $email = $fmail; } else { $email = $fmail.",".$smail; } echo $html; // $email = 'n.ogungbemi@niqs.org.ng'; /* $email = 'niyiment@gmail.com'; sendMail($email,$html); */ if(sendMail($email,$html)){ //update sent mysql_query("UPDATE members SET sent='6' WHERE memberNo='$memNo'"); }else{ echo "Error Sending Mail"; } } function sendMail($email,$html){ $from = "info@niqs.org.ng"; //enter your email address $to = $email; //enter the email address of the contact your sending to $subject = "International Programmes and Events"; // subject of your email $headers = array ('From' => $from,'To' => $to, 'Subject' => $subject); $text = ''; // text versions of email. //$html = "<html><body>Name: $name <br> Email: $email <br>Message: $message <br></body></html>"; // html versions of email. $crlf = "\n"; $mime = new Mail_mime($crlf); //$mime->setTXTBody($text); $mime->setHTMLBody($html); //do not ever try to call these lines in reverse order $body = $mime->get(); $headers = $mime->headers($headers); $host = "localhost"; // all scripts must use localhost $username = "info@niqs.org.ng"; // your email address (same as webmail username) $password = "1969niqsheadofficeabuja"; // your password (same as webmail password) $smtp = Mail::factory('smtp', array ('host' => $host, 'auth' => true, 'username' => $username,'password' => $password,'port' => 25)); $mail = $smtp->send($to, $headers, $body); if (PEAR::isError($mail)) { return 0; //echo("<p>" . $mail->getMessage() . "</p>"); } else { return 1; //echo("<p>Message successfully sent!</p>"); // header("Location: http://www.example.com/"); } } function strafter($string, $substring) { $pos = strpos($string, $substring); if ($pos === false) return $string; else return(substr($string, $pos+strlen($substring))); } function strbefore($string, $substring) { $pos = strpos($string, $substring); if ($pos === false) return $string; else return(substr($string, 0, $pos)); } ?>