-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathsetup_config.php
99 lines (92 loc) · 3.52 KB
/
setup_config.php
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
<?php
/*************************************************************
Description: Setup configuration for the SMTP Mail Class
Author : halojoy https://github.com/halojoy
Copyright : 2018 halojoy
License : MIT License https://opensource.org/licenses/MIT
*************************************************************/
?>
<!DOCTYPE html>
<html>
<head>
<style>
body {width: 600px; margin: 20px auto;}
</style>
</head>
<body>
<?php
if (isset($_POST['submit'])) {
$write = <<<EOF
<?php
\$cfg_server = '{$_POST['server']}';
\$cfg_port = {$_POST['port']};
\$cfg_secure = '{$_POST['secure']}';
\$cfg_username = '{$_POST['usernm']}';
\$cfg_password = '{$_POST['passwd']}';
EOF;
file_put_contents('conf/config_smtp.php', $write);
echo 'Success.<br>
Your data has been put in <b>conf/config_smtp.php</b> file.<br>
You can now use <b>SMTP Mailer</b>
</body>
</html>';
exit();
}
?>
<form method="post">
<table>
<tr>
<td></td>
<td><h3>Setup config for SMTP Mailer</h3></td></tr>
<tr>
<td></td>
<td><b>SMTP Server Settings</b></td></tr>
<tr><td colspan="2"> </td></tr>
<tr>
<td valign="top">SMTP Server, Host</td>
<td><input type="radio" name="server" value="smtp.gmail.com" checked> smtp.gmail.com<br>
<input type="radio" name="server" value="smtp-mail.outlook.com"> smtp-mail.outlook.com<br>
<input type="radio" name="server" value="smtp.live.com"> smtp.live.com<br>
<input type="radio" name="server" value="smtp.mail.yahoo.com"> smtp.mail.yahoo.com<br>
<input type="radio" name="server" value="smtp.aol.com"> smtp.aol.com<br>
<input type="radio" name="server" value="smtp.gmx.com"> smtp.gmx.com<br>
<input type="radio" name="server" value="smtp.zoho.com"> smtp.zoho.com<br>
<input type="radio" name="server" value="smtp.yandex.com"> smtp.yandex.com<br>
<input type="radio" name="server" value="smtp.mailjet.com"> smtp.mailjet.com<br>
<input type="radio" name="server" value="in.mailjet.com"> in.mailjet.com<br>
<input type="radio" name="server" value="in-v3.mailjet.com"> in-v3.mailjet.com<br>
<input type="radio" name="server" value="smtp.lycos.com"> smtp.lycos.com<br>
<input type="radio" name="server" value="mail.smtp2go.com"> mail.smtp2go.com<br>
<input type="radio" name="server" value="pro.turbo-smtp.com"> pro.turbo-smtp.com
</td></tr>
<tr><td colspan="2"> </td></tr>
<tr>
<td valign="top">Security Protocol</td>
<td><input type="radio" name="secure" value="tls" checked>TLS
<input type="radio" name="secure" value="ssl">SSL
<input type="radio" name="secure" value="">No secure</td></tr>
<tr><td colspan="2"> </td></tr>
<tr>
<td valign="top">Server Port Number</td>
<td><input type="radio" name="port" value="587" checked> 587 (for TLS)<br>
<input type="radio" name="port" value="465"> 465 (for SSL)<br>
<input type="radio" name="port" value="25"> 25 (No secure)</td></tr>
<tr><td colspan="2"> </td></tr>
<tr>
<td></td>
<td><b>SMTP Server Login</b></td></tr>
<tr><td colspan="2"> </td></tr>
<tr>
<td>Your Username</td>
<td><input name="usernm" size="35" required></td></tr>
<tr>
<td>Your Password</td>
<td><input name="passwd" size="35" required></td></tr>
<tr><td colspan="2"> </td></tr>
<tr>
<td></td>
<td><input type="submit" name="submit"></td></tr>
</table>
</form>
</body>
</html>