-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfeedback.html
49 lines (47 loc) · 1.84 KB
/
feedback.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>feedback form</title>
<link rel="stylesheet" href="feedback.css">
</head>
<body>
<div class="container">
<form>
<h3>Student Complaint Form against ragging:</h3>
<input type="text" id="name" placeholder="Your name" required>
<input type="text" id="email" placeholder="Email id" required>
<input type="text" id="year" placeholder="current year of study" required>
<input type="text" id="phone" placeholder="Phone no." required>
<textarea id="message" rows="5" coloum="5" placeholder="student's complain" required></textarea>
<button type="button" onclick="SendEmail()">Send</button>
</form>
</div>
<script src="https://smtpjs.com/v3/smtp.js"> </script>
<script>
function SendEmail() {
let name = document.getElementById("name").value;
let email = document.getElementById("email").value;
let phone = document.getElementById("phone").value;
let message = document.getElementById("message").value;
let year = document.getElementById("year").value;
let body = "Name: " + name + "<br/>Email: " + email + "<br/>Year of study: " + year + "<br/>Phone no: " + phone + "<br/>" + message;
Email.send({
Host: "smtp.elasticemail.com",
Username: "[email protected]",
Password: "DEC21776A7A28B811D5421B2A793A1E714C1",
To: '[email protected]',
From: "[email protected]",
Subject: "Student Complaint Form",
Body: body
}).then(
message => {
alert("Message sent successfully");
window.location.href = "index.html";
}
);
}
</script>
</body>
</html>