-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcontact.html
55 lines (54 loc) · 2.29 KB
/
contact.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>contact us</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="src/styles/contact.css">
</head>
<header>
<div>
<img id="logoImage" src="assets\logo\phd-logos.jpg">
</div>
<nav>
<ul>
<li> <a href="postJob.html"> Post a Job </a> </li>
<li> <a href="signup.html"> Sign Up </a> </li>
<li> <a href="signup.html"> Sign In </a> </li>
</ul>
</nav>
</header>
<body>
<div class="container">
<form onsubmit="sendEmail(); reset(); return false;">
<h3>Contact Us</h3>
<input type="text" id="name" placeholder="Your Name" required>
<input type="email" id="email" placeholder="Email" required>
<input type="text" id="phone" placeholder="Phone Number" required>
<textarea id="message" rows="4" placeholder="How can we help you?"></textarea>
<button type="submit">Send</button>
</form>
</div>
<script src=" https://smtpjs.com/v3/smtp.js"></script>
<script>
function sendEmail(){
Email.send({
Host : "smtp.gmail.com",
Username : "[email protected]",
Password : "rozgr123",
To : '[email protected]',
From : document.getElementById("email").value,
Subject : "New Contact Form Enquiry",
Body : "Name: " + document.getElementById("name").value +
"<br> Email: " + document.getElementById("email").value +
"<br> Phone no: " + document.getElementById("phone").value +
"<br> Message: " + document.getElementById("message").value
}).then(
message => alert("Message Sent Successfully!")
);
}
</script>
</body>
<footer>
<p>DART © <script>document.write(new Date().getFullYear());</script> All Rights Reserved!</p> </footer>
</html>