Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if ($_SERVER['REQUEST_METHOD'] == 'POST') {
- $status = $_POST['status'];
- $uname = $_POST['uname'];
- $dept = $_POST['dept'];
- $ename = $_POST['ename'];
- require_once('dbConnect.php');
- $sql = "SELECT name,email FROM user WHERE mobile='" . $uname . "'";
- $check = mysqli_fetch_row(mysqli_query($con, $sql));
- $username = $check[0];
- $email = $check[1];
- require_once 'smsapi/way2sms-api.php';
- sendWay2SMS('username', 'password', $uname,' Message');
- require_once 'mailapi/PHPMailerAutoload.php';
- $mail = new PHPMailer;
- $mail->isSMTP(); // Set mailer to use SMTP
- $mail->Host = 'smtp.gmail.com'; // Specify main and backup SMTP servers
- $mail->SMTPAuth = true; // Enable SMTP authentication
- $mail->Username = 'username@gmail.com'; // SMTP username
- $mail->Password = 'password'; // SMTP password
- $mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted
- $mail->Port = 587; // TCP port to connect to
- $mail->setFrom('username@gmail.com', 'Name');
- $mail->addAddress($email, $username);
- $mail->isHTML(true);
- $mail->Subject = 'Subject';
- $mail->Body = 'Message';
- !$mail->send();
- }
- ?>
- <?php
- require_once 'smsapi/way2sms-api.php';
- sendWay2SMS('username', 'password', $uname,' Message');
- ?>
- <?php
- require_once 'mailapi/PHPMailerAutoload.php';
- $mail = new PHPMailer;
- $mail->isSMTP(); // Set mailer to use SMTP
- $mail->Host = 'smtp.gmail.com'; // Specify main and backup SMTP servers
- $mail->SMTPAuth = true; // Enable SMTP authentication
- $mail->Username = 'username@gmail.com'; // SMTP username
- $mail->Password = 'password'; // SMTP password
- $mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted
- $mail->Port = 587; // TCP port to connect to
- $mail->setFrom('username@gmail.com', 'Name');
- $mail->addAddress($email, $username);
- $mail->isHTML(true);
- $mail->Subject = 'Subject';
- $mail->Body = 'Message';
- !$mail->send();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement