| Server IP : 50.63.8.194 / Your IP : 216.73.216.202 Web Server : Microsoft-IIS/10.0 System : Windows NT P3NWVPWEB026 10.0 build 17763 (Windows Server 2016) AMD64 User : IWPD_7824(SpiPanel) ( 0) PHP Version : 7.3.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : G:/PleskVhosts/polyprep.in/mmitshamli.ac.in/home/ |
Upload File : |
<?php
include("../admin/connection.php");
$name = $_POST['name'];
$enroll = $_POST['enroll'];
$mob = $_POST['mob'];
$email = $_POST['email'];
$sub = $_POST['subject'];
$msg = $_POST['message'];
$q_ins = "insert into tbl_grievance (stu_name, enroll_no, mobile, email, subject, msg, status, date) values('$name', '$enroll', '$mob', '$email', '$sub', '$msg', 'N', CURRENT_DATE())";
if(mysqli_query($dbCon, $q_ins)){
$id_query = "select g_id from tbl_grievance where email='$email' order by g_id desc limit 1";
$res_id = mysqli_query($dbCon, $id_query);
$row_id = mysqli_fetch_array($res_id);
$g_id = $row_id['g_id'];
$token_no = "G2022".$g_id;
$message = $msg."<br/><br/>".$token_no;
require 'class/class.phpmailer.php';
$mail = new PHPMailer;
$mail->IsSMTP(); //Sets Mailer to send message using SMTP
$mail->Host = 'smtpout.secureserver.net'; //Sets the SMTP hosts of your Email hosting, this for Godaddy
$mail->Port = '80'; //Sets the default SMTP server port
$mail->SMTPAuth = true; //Sets SMTP authentication. Utilizes the Username and Password variables
$mail->Username = 'hr@softproindia.in'; //Sets SMTP username
$mail->Password = 'hr@softpro@2020'; //Sets SMTP password
$mail->SMTPSecure = ''; //Sets connection prefix. Options are "", "ssl" or "tls"
$mail->From = $_POST["email"]; //Sets the From email address for the message
$mail->FromName = $_POST["name"]; //Sets the From name of the message
$mail->AddAddress('mmitshamli@gmail.com', 'Name'); //Adds a "To" address
$mail->AddCC('lokeshrt12@gmail.com', $_POST["name"]); //Adds a "Cc" address
$mail->WordWrap = 50; //Sets word wrapping on the body of the message to a given number of characters
$mail->IsHTML(true); //Sets message type to HTML
$mail->Subject = $_POST["subject"]; //Sets the Subject of the message
$mail->Body = $message; //An HTML or plain text message body
if($mail->Send()) //Send an Email. Return true on success or false on error
{
$mail->IsSMTP(); //Sets Mailer to send message using SMTP
$mail->Host = 'smtpout.secureserver.net'; //Sets the SMTP hosts of your Email hosting, this for Godaddy
$mail->Port = '80'; //Sets the default SMTP server port
$mail->SMTPAuth = true; //Sets SMTP authentication. Utilizes the Username and Password variables
$mail->Username = 'hr@softproindia.in'; //Sets SMTP username
$mail->Password = 'hr@softpro@2020'; //Sets SMTP password
$mail->SMTPSecure = 'lokeshrt12@gmail.com'; //Sets connection prefix. Options are "", "ssl" or "tls"
$mail->From = 'mmitshamli@gmail.com'; //Sets the From email address for the message
$mail->FromName = $_POST["name"]; //Sets the From name of the message
$mail->AddAddress($_POST["email"], 'Name'); //Adds a "To" address
//$mail->AddCC('lokeshrt12@gmail.com', $_POST["name"]); //Adds a "Cc" address
$mail->WordWrap = 50; //Sets word wrapping on the body of the message to a given number of characters
$mail->IsHTML(true); //Sets message type to HTML
$mail->Subject = $_POST["subject"]; //Sets the Subject of the message
$mail->Body = $message;
if($mail->Send()){
header("location:grievance.php?msg=1");
}else{
header("location:grievance.php?msg=mailinner");
}
}
else
{
header("location:grievance.php?msg=mailouter");
}
}else{
header("location:grievance.php?msg=0");
}
?>