isSMTP(); $mail->Host = 'smtp.gmail.com'; $mail->SMTPAuth = true; $mail->Username = 'sspappkeys@gmail.com'; $mail->Password = 'momcjmfzwcfastuu'; $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; $mail->Port = 587; // Sender and recipient $mail->setFrom('sspappkeys@gmail.com', 'Website Contact Form'); $mail->addAddress('Anujlochav@gmail.com', 'Recipient Name'); // Content $mail->isHTML(true); $mail->Subject = 'New Comment from Website'; $mail->Body = "

New Comment Received

Name: {$name}

Email: {$email}

Mobile: {$mobile}

Comment:
{$comment}

"; $mail->send(); // Show alert and redirect echo ""; exit(); } catch (Exception $e) { echo ""; exit(); } } ?>