alert('Fill All Details'); window.location.href = 'contact.php'; "; } else { try { //Server settings $mail->isSMTP(); //Send using SMTP $mail->Host = 'mail.pawspetcremationgurgaon.com'; //Set the SMTP server to send through $mail->SMTPAuth = true; //Enable SMTP authentication $mail->Username = 'info@pawspetcremationgurgaon.com'; //SMTP username $mail->Password = 'sspsoftpro@123'; //SMTP password $mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS; //Enable implicit TLS encryption $mail->Port = 465; //TCP port to connect to; use 587 if you have set `SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS` //Recipients $mail->setFrom('info@pawspetcremationgurgaon.com', 'Mailer'); $mail->addAddress('info@pawspetcremationgurgaon.com', ' User'); //Add a recipient //Content $mail->isHTML(true); //Set email format to HTML $mail->Subject = 'User Enquiry'; $mail->Body = "User Name : $name
Email : $email
Subject : $subject
Message : $message"; $mail->send(); echo " "; }catch (Exception $e) { echo " "; } } } ?>