-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.html
More file actions
148 lines (122 loc) · 5.56 KB
/
app.html
File metadata and controls
148 lines (122 loc) · 5.56 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Firemail</title>
<meta name="viewport" content="width=device-width, user-scalable=no" />
<link rel="stylesheet" href="vendor/Building-Blocks/style/headers.css">
<link rel="stylesheet" href="vendor/Building-Blocks/style/buttons.css">
<link rel="stylesheet" href="vendor/Building-Blocks/style/input_areas.css">
<link rel="stylesheet" href="vendor/Building-Blocks/style/switches.css">
<link rel="stylesheet" href="vendor/Building-Blocks/util.css">
<link rel="stylesheet" href="vendor/Building-Blocks/fonts.css">
<!-- data-main attribute tells require.js to load
scripts/main.js after require.js loads. -->
<script data-main="app" src="require.js"></script>
<script>
// load SMTP data from localStorage (if set)
document.addEventListener("DOMContentLoaded", function(evt){
try{
var mail = JSON.parse(localStorage.firemailDemo);
if(mail.smtp){
document.getElementById("host").value = mail.smtp.host || "localhost";
document.getElementById("port").value = mail.smtp.port || "";
document.getElementById("ssl").checked = !!mail.smtp.useSSL;
if(mail.smtp.auth){
document.getElementById("user").value = mail.smtp.auth.user || "";
document.getElementById("pass").value = mail.smtp.auth.pass || "";
}
}
document.getElementById("from").value = mail.from || "";
}catch(E){}
}, false);
</script>
</head>
<body>
<section role="region" id="index" data-position="current" class="skin-dark">
<header class="fixed">
<h1>Firemail <em>demo</em></h1>
</header>
<article class="content scrollable header">
<p>
<button onclick="window.location.href='../test/testrunner.html'">
Run Unit Tests
</button>
</p>
<form method="post" action="." onsubmit="sendMail(); return false;">
<header><h2>SMTP settings</h2></header>
<fieldset>
<legend>Host</legend>
<section>
<p>
<input type="text" id="host" value="smtp.gmail.com" placeholder="Hostname" required/>
</p>
<p>
<input type="number" id="port" value="465" placeholder="Port" required/>
</p>
<table>
<tr>
<td>
<label>
<input type="checkbox" id="ssl" checked>
<span></span>
</label>
</td>
<td>
Use SSL
</td>
</tr>
</table>
</section>
</fieldset>
<fieldset>
<legend>Auth</legend>
<section>
<p>
<input type="text" id="user" value="" placeholder="Username"/>
</p>
<p>
<input type="password" id="pass" value="" placeholder="Password"/>
</p>
</section>
</fieldset>
<header><h2>Compose e-mail</h2></header>
<fieldset>
<legend>From</legend>
<section>
<p>
<input type="text" id="from" value="" placeholder="From"/>
</p>
</section>
</fieldset>
<fieldset>
<legend>To</legend>
<section>
<p>
<input type="text" id="to" value="" placeholder="To" required/>
</p>
</section>
</fieldset>
<fieldset>
<legend>Subject</legend>
<section>
<p>
<input type="text" id="subject" value="" placeholder="Subject"/>
</p>
</section>
</fieldset>
<p>
<textarea id="text" placeholder="E-mail message">
-- best regards</textarea>
</p>
<p>
<input type="file" id="attachment"/>
</p>
<p>
<button type="submit" id="sendBtn" class="recommend">Send mail</button>
</p>
</form>
</article>
</section>
</body>
</html>