From 9f7a3e38595ba74218914ade21a308fc6e9bde6b Mon Sep 17 00:00:00 2001 From: Nima Maghooli Date: Fri, 26 Apr 2024 15:16:50 +0330 Subject: [PATCH] Update index.html --- index.html | 106 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 104 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 5f4b96f..ad77d65 100644 --- a/index.html +++ b/index.html @@ -917,6 +917,103 @@

Open Hours

+ + +
+
+
+
+
+
+
+ +
+
+
+
+
+
+ +
+
+
+ +
+
+ +
+
+ + +$(document).ready(function (e){ +$("#frmContact").on('submit',(function(e){ + e.preventDefault(); + $('#loader-icon').show(); + var valid; + valid = validateContact(); + if(valid) { + $.ajax({ + url: "contact_mail.php", + type: "POST", + data: new FormData(this), + contentType: false, + cache: false, + processData:false, + success: function(data){ + $("#mail-status").html(data); + $('#loader-icon').hide(); + }, + error: function(){} + + }); + } +})); + +require('phpmailer/class.phpmailer.php'); +$mail = new PHPMailer(); +$mail->IsSMTP(); +$mail->SMTPDebug = 0; +$mail->SMTPAuth = TRUE; +$mail->SMTPSecure = "tls"; +$mail->Port = 587; +$mail->Username = "Your SMTP UserName"; +$mail->Password = "Your SMTP Password"; +$mail->Host = "Your SMTP Host"; +$mail->Mailer = "smtp"; +$mail->SetFrom($_POST["userEmail"], $_POST["userName"]); +$mail->AddReplyTo($_POST["userEmail"], $_POST["userName"]); +$mail->AddAddress("recipient address"); +$mail->Subject = $_POST["subject"]; +$mail->WordWrap = 80; +$mail->MsgHTML($_POST["content"]); + +if(is_array($_FILES)) { + $mail->AddAttachment($_FILES['attachmentFile']['tmp_name'],$_FILES['attachmentFile']['name']); +} + +$mail->IsHTML(true); +if(!$mail->Send()) { + echo "Problem in Sending Mail."; +} else { + echo "Contact Mail Sent."; +} + + + + + + + -
+ + + + + +