isSMTP(); $mail->Host = 'smtp.gmail.com'; $mail->SMTPAuth = true; $mail->Username = 'sspappkeys@gmail.com'; $mail->Password = 'momcjmfzwcfastuu'; $mail->SMTPSecure = 'tls'; $mail->Port = 587; // Email Setup $mail->setFrom('sspappkeys@gmail.com', 'Enquiry Form'); $mail->addAddress('info@himalayastravelsandtourism.com', 'Admin'); $mail->isHTML(true); $mail->Subject = 'New Contact Form Submission'; $mail->Body = "
Name: {$name}
Email: {$email}
Mobile: {$mobile}
Comment: {$comment}
"; $mail->send(); $message = "Thank you! Your message has been sent successfully."; $alertType = "success"; } catch (Exception $e) { $message = "Message could not be sent. Mailer Error: {$mail->ErrorInfo}"; $alertType = "error"; } // Display SweetAlert and redirect echo " "; } ?>