2 require_once "../../inc/common.php";
3 require_once "../../inc/header.php";
5 if (!current_user_can(PERMISSION_MANAGE_PLUGINS
))
7 echo "<h4>Access denied</h4>";
8 require_once "../../inc/footer.php";
11 foreach($_POST as $key => $value)
13 var_dump("duck",$key,$value);
14 if ($key == "fromEmail")
15 $config['smtp']["username"];
16 elseif ($key == "smtpPass")
17 $config['smtp']['smtpPass'];
18 elseif ($key == "fromName")
19 $config['smtp']['from_name'];
20 elseif ($key == "smtpHost")
21 $config['smtp']['host'];
22 elseif ($key == "port")
23 $config['smtp']['port'];
24 elseif ($key == "smtpEnc")
25 $config['smtp']['smtpEnc'];
32 <h4
>Mail Settings
</h4
>
33 <div
class="card card-body mb-3" style
="max-width:50%">
34 <form method
="post" action
="mail-settings.php" autocomplete
="off" enctype
="multipart/form-data">
35 <div
class="form-group row">
36 <label
for="fromEmail" class="col-sm-2 col-form-label">Email
</label
>
37 <div
class="col-sm-10">
38 <input type
="email" class="form-control" id
="fromEmail" name
="fromEmail" placeholder
="yourname@example.com" value
="<?php echo get_config("smtp
::username
") ?>">
41 <div
class="form-group row">
42 <label
for="smtpPass" class="col-sm-2 col-form-label">Email Password
</label
>
43 <div
class="col-sm-10">
44 <input type
="password" class="form-control" id
="smtpPass" name
="smtpPass" value
="<?php echo get_config("smtp
::password
") ?>">
47 <div
class="form-group row">
48 <label
for="fromName" class="col-sm-2 col-form-label">From Name
</label
>
49 <div
class="col-sm-10">
50 <input type
="text" class="form-control" id
="fromName" name
="fromName" value
="<?php echo get_config("smtp
::from_name
") ?>">
53 <div
class="form-group row">
54 <label
for="smtpHost" class="col-sm-2 col-form-label">SMTP Host
</label
>
55 <div
class="col-sm-10">
56 <input type
="text" class="form-control" id
="smtpHost" name
="smtpHost" value
="<?php echo get_config("smtp
::host
") ?>">
59 <div
class="form-group row">
60 <label
for="smtpPort" class="col-sm-2 col-form-label">SMTP Port
</label
>
61 <div
class="col-sm-10">
62 <input type
="text" class="form-control" id
="smtpPort" name
="smtpPort" value
="<?php echo get_config("smtp
::port
") ?>">
66 <div
class="form-check">
67 <input
class="form-check-input" type
="radio" name
="smtpEnc" id
="radioOne" value
="TLS" checked
>
68 <label
class="form-check-label" for="radioOne">
69 TLS Encryption
<i
>(Recommended
)</i
>
72 <div
class="form-check">
73 <input
class="form-check-input" type
="radio" name
="smtpEnc" id
="radioTwo" value
="SSL">
74 <label
class="form-check-label" for="radioTwo">
80 <div
class="float-right">
81 <input type
="submit" class="btn btn-primary" value
="Submit">
87 require_once "../../inc/footer.php";