-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsend-mail.html
More file actions
106 lines (94 loc) · 1.9 KB
/
Copy pathsend-mail.html
File metadata and controls
106 lines (94 loc) · 1.9 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<!DOCTYPE html>
<html>
<head>
<title>Go Contact Form API</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background-color: #f4f7f6;
color: #333;
}
h1 {
text-align: center;
margin-top: 50px;
color: #4CAF50;
}
p {
font-size: 1.1em;
line-height: 1.6;
margin: 20px 0;
padding: 0 20px;
}
pre {
background-color: #333;
color: #fff;
padding: 10px;
border-radius: 5px;
font-family: monospace;
overflow-x: auto;
margin: 20px 0;
word-wrap: break-word;
}
strong {
color: #4CAF50;
}
.container {
width: 80%;
max-width: 1000px;
margin: 0 auto;
padding: 20px;
background-color: #fff;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
border-radius: 10px;
}
.example-request {
background-color: #f0f0f0;
border: 1px solid #ccc;
padding: 15px;
margin: 20px 0;
border-radius: 5px;
}
.example-request pre {
background-color: #fff;
color: #333;
border: none;
}
/* Responsive styling */
@media (max-width: 768px) {
body {
font-size: 0.9em;
}
.container {
width: 95%;
}
}
</style>
</head>
<body>
<div class="container">
<h1>Welcome to the Go Email Sender API</h1>
<p>This is the backend for the contact form. Please use the <strong>/send-email</strong> route to send a
message.</p>
<p>Method: <strong>POST</strong></p>
<p>Expected Body (JSON format):</p>
<pre>
{
"name": "Your Name",
"email": "your.email@example.com",
"subject": "Subject of the message",
"message": "Your message here"
}
</pre>
<p>Example request:</p>
<div class="example-request">
<pre>
curl -X POST http://localhost:8080/send-email \
-H "Content-Type: application/json" \
-d '{"name": "John Doe", "email": "john.doe@example.com", "subject": "Hello", "message": "I want to get in touch!"}'
</pre>
</div>
</div>
</body>
</html>