Email: '.$_POST['emailid'].'
Phone: '.$_POST['phone'].'
Subject: '.$_POST['subject'].'
Message: '.$_POST['message'].'
';
require "phpmailer/class.phpmailer.php"; //include phpmailer class
// Instantiate Class
$mail = new PHPMailer();
// Set up SMTP
$mail->IsSMTP(); // Sets up a SMTP connection
$mail->SMTPAuth = true; // Connection with the SMTP does require authorization
$mail->SMTPSecure = "ssl"; // Connect using a TLS connection
$mail->Host = "smtp.gmail.com"; //Gmail SMTP server address
$mail->Port = 465; //Gmail SMTP port
$mail->Encoding = '7bit';
// Authentication
$mail->Username = "rjgaikwad777@gmail.com"; // Your full Gmail address
$mail->Password = "08081990"; // Your Gmail password
// Compose
$mail->SetFrom($_POST['emailid'], $_POST['fullname']);
$mail->AddReplyTo($_POST['emailid'], $_POST['fullname']);
$mail->Subject = "Rk ReSearch ValleY - Regarding for Get In Touch"; // Subject (which isn't required)
$mail->MsgHTML($message);
// Send To
$mail->AddAddress("rkitechvalley@gmail.com", "Rk ReSearch ValleY"); // Where to send it - Recipient
$mail->addBCC('rajgaikwad989@gmail.com');
$result = $mail->Send(); // Send!
$message = $result ? 'Successfully Sent!' : 'Sending Failed!';
unset($mail);
}
?>