edit_mail_acc.php 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. <!-- Begin toolbar -->
  2. <div class="toolbar">
  3. <div class="toolbar-inner">
  4. <div class="toolbar-buttons">
  5. <a class="button button-secondary button-back js-button-back" href="/list/mail/?domain=<?= htmlentities(trim($v_domain, "'")) ?>&token=<?= $_SESSION["token"] ?>">
  6. <i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
  7. </a>
  8. </div>
  9. <div class="toolbar-buttons">
  10. <button type="submit" class="button" form="main-form">
  11. <i class="fas fa-floppy-disk icon-purple"></i><?= _("Save") ?>
  12. </button>
  13. </div>
  14. </div>
  15. </div>
  16. <!-- End toolbar -->
  17. <div class="container animate__animated animate__fadeIn">
  18. <form
  19. x-data="{
  20. hasAutoReply: <?= $v_autoreply == "yes" ? "true" : "false" ?>
  21. }"
  22. id="main-form"
  23. name="v_edit_mail_acc"
  24. method="post"
  25. class="<?= $v_status ?>"
  26. >
  27. <input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
  28. <input type="hidden" name="save" value="save">
  29. <div class="form-container form-container-wide">
  30. <h1 class="u-mb20"><?= _("Edit Mail Account") ?></h1>
  31. <?php show_alert_message($_SESSION); ?>
  32. <div class="sidebar-right-grid">
  33. <div class="sidebar-right-grid-content">
  34. <div class="u-mb10">
  35. <label for="v_email" class="form-label"><?= _("Account") ?></label>
  36. <input type="text" class="form-control" name="v_email" id="v_email" value="<?= htmlentities($_GET["account"]) . "@" . htmlentities($_GET["domain"]) ?>" disabled>
  37. <input type="hidden" name="v_domain" value="<?= htmlentities(trim($v_domain, "'")) ?>">
  38. <input type="hidden" name="v_account" value="<?= htmlentities(trim($v_account, "'")) ?>" class="js-account-input">
  39. </div>
  40. <div class="u-mb10">
  41. <label for="v_password" class="form-label">
  42. <?= _("Password") ?>
  43. <button type="button" title="<?= _("Generate") ?>" class="u-unstyled-button u-ml5 js-generate-password">
  44. <i class="fas fa-arrows-rotate icon-green"></i>
  45. </button>
  46. </label>
  47. <div class="u-pos-relative u-mb10">
  48. <input type="text" class="form-control js-password-input" name="v_password" id="v_password" value="<?= htmlentities(trim($v_password, "'")) ?>">
  49. <div class="password-meter">
  50. <meter max="4" class="password-meter-input js-password-meter"></meter>
  51. </div>
  52. </div>
  53. </div>
  54. <p class="u-mb10"><?= _("Your password must have at least") ?>:</p>
  55. <ul class="u-list-bulleted u-mb20">
  56. <li><?= _("8 characters long") ?></li>
  57. <li><?= _("1 uppercase & 1 lowercase character") ?></li>
  58. <li><?= _("1 number") ?></li>
  59. </ul>
  60. <div class="u-mb10">
  61. <label for="v_send_email" class="form-label">
  62. <?= _("Email login credentials to:") ?>
  63. </label>
  64. <input type="email" class="form-control" name="v_send_email" id="v_send_email" value="<?= htmlentities(trim($v_send_email, "'")) ?>">
  65. </div>
  66. <div class="u-mb10">
  67. <label for="v_quota" class="form-label">
  68. <?= _("Quota") ?> <span class="optional">(<?= _("in MB") ?>)</span>
  69. </label>
  70. <div class="u-pos-relative">
  71. <input type="text" class="form-control" name="v_quota" id="v_quota" value="<?php if (!empty($v_quota)) {echo htmlentities(trim($v_quota, "'"));} else { echo "0"; } ?>">
  72. <button type="button" class="unlimited-toggle js-unlimited-toggle" title="<?= _("Unlimited") ?>">
  73. <i class="fas fa-infinity"></i>
  74. </button>
  75. </div>
  76. </div>
  77. <div class="u-mb10">
  78. <label for="v_aliases" class="form-label">
  79. <?= _("Aliases") ?> <span class="optional">(<?= _("Use local-part without domain name") ?>)</span>
  80. </label>
  81. <textarea class="form-control" name="v_aliases" id="v_aliases"><?= htmlentities(trim($v_aliases, "'")) ?></textarea>
  82. </div>
  83. <div class="form-check">
  84. <input class="form-check-input js-discard-all-mail" type="checkbox" name="v_blackhole" id="v_blackhole" <?php if ($v_blackhole == 'yes') echo 'checked' ?>>
  85. <label for="v_blackhole">
  86. <?= _("Discard all mail") ?>
  87. </label>
  88. </div>
  89. <div class="form-check <?php if ($v_blackhole == 'yes') { echo 'u-hidden'; } ?>">
  90. <input class="form-check-input" type="checkbox" name="v_fwd_only" id="v_fwd_for" <?php if ($v_fwd_only == 'yes') echo 'checked' ?>>
  91. <label for="v_fwd_for">
  92. <?= _("Do not store forwarded mail") ?>
  93. </label>
  94. </div>
  95. <div class="u-mb10">
  96. <label for="v_fwd" class="form-label">
  97. <?= _("Forward to") ?> <span class="optional">(<?= _("one or more email addresses") ?>)</span>
  98. </label>
  99. <textarea class="form-control" name="v_fwd" id="v_fwd" <?php if ($v_blackhole == 'yes') echo "disabled"; ?>><?= htmlentities(trim($v_fwd, "'")) ?></textarea>
  100. </div>
  101. <div class="form-check u-mb10">
  102. <input x-model="hasAutoReply" class="form-check-input" type="checkbox" name="v_autoreply" id="v_autoreply">
  103. <label for="v_autoreply">
  104. <?= _("Auto Reply") ?>
  105. </label>
  106. </div>
  107. <div x-cloak x-show="hasAutoReply" id="autoreplytable">
  108. <div class="u-mb10">
  109. <label for="v_autoreply_message" class="form-label"><?= _("Message") ?></label>
  110. <textarea class="form-control" name="v_autoreply_message" id="v_autoreply_message"><?= htmlentities(trim($v_autoreply_message, "'")) ?></textarea>
  111. </div>
  112. </div>
  113. <div class="u-mb20">
  114. <label for="v_rate" class="form-label">
  115. <?= _("Rate Limit") ?> <span class="optional">(<?= _("email / hour") ?>)</span>
  116. </label>
  117. <input type="text" class="form-control" name="v_rate" id="v_rate" value="<?= htmlentities(trim($v_rate, "'")) ?>" <?php if ($_SESSION['userContext'] != "admin"){ echo "disabled"; }?>>
  118. </div>
  119. </div>
  120. <div class="sidebar-right-grid-sidebar">
  121. <div class="panel js-mail-info">
  122. <h2 class="u-text-H3 u-mb10"><?= _("Common Account Settings") ?></h2>
  123. <ul class="values-list u-mb20">
  124. <li class="values-list-item">
  125. <span class="values-list-label"><?= _("Username") ?></span>
  126. <span class="values-list-value u-overflow"><span class="js-account-output"></span>@<?= htmlentities(trim($v_domain, "'")) ?></span>
  127. </li>
  128. <li class="values-list-item">
  129. <span class="values-list-label"><?= _("Password") ?></span>
  130. <span class="values-list-value u-overflow"><span class="js-password-output"></span></span>
  131. </li>
  132. <?php if ($_SESSION["WEBMAIL_SYSTEM"]) { ?>
  133. <li class="values-list-item">
  134. <span class="values-list-label"><?= _("Webmail") ?></span>
  135. <span class="values-list-value"><a href="http://<?= htmlentities($v_webmail_alias) ?>" target="_blank">http://<?= htmlentities($v_webmail_alias) ?></a></span>
  136. </li>
  137. <?php } ?>
  138. <li class="values-list-item">
  139. <span class="values-list-label"><?= _("Hostname") ?></span>
  140. <span class="values-list-value">mail.<?= htmlentities($v_domain) ?></span>
  141. </li>
  142. </ul>
  143. <h2 class="u-text-H3 u-mb10"><?= _("IMAP Settings") ?></h2>
  144. <ul class="values-list u-mb20">
  145. <li class="values-list-item">
  146. <span class="values-list-label"><?= _("Authentication") ?></span>
  147. <span class="values-list-value"><?= _("Normal password") ?></span>
  148. </li>
  149. <li class="values-list-item">
  150. <span class="values-list-label">SSL/TLS</span>
  151. <span class="values-list-value"><?= _("Port") ?> 993</span>
  152. </li>
  153. <li class="values-list-item">
  154. <span class="values-list-label">STARTTLS</span>
  155. <span class="values-list-value"><?= _("Port") ?> 143</span>
  156. </li>
  157. <li class="values-list-item">
  158. <span class="values-list-label"><?= _("No encryption") ?></span>
  159. <span class="values-list-value"><?= _("Port") ?> 143</span>
  160. </li>
  161. </ul>
  162. <h2 class="u-text-H3 u-mb10"><?= _("POP3 Settings") ?></h2>
  163. <ul class="values-list u-mb20">
  164. <li class="values-list-item">
  165. <span class="values-list-label"><?= _("Authentication") ?></span>
  166. <span class="values-list-value"><?= _("Normal password") ?></span>
  167. </li>
  168. <li class="values-list-item">
  169. <span class="values-list-label">SSL/TLS</span>
  170. <span class="values-list-value"><?= _("Port") ?> 995</span>
  171. </li>
  172. <li class="values-list-item">
  173. <span class="values-list-label">STARTTLS</span>
  174. <span class="values-list-value"><?= _("Port") ?> 110</span>
  175. </li>
  176. <li class="values-list-item">
  177. <span class="values-list-label"><?= _("No encryption") ?></span>
  178. <span class="values-list-value"><?= _("Port") ?> 110</span>
  179. </li>
  180. </ul>
  181. <h2 class="u-text-H3 u-mb10"><?= _("SMTP Settings") ?></h2>
  182. <ul class="values-list">
  183. <li class="values-list-item">
  184. <span class="values-list-label"><?= _("Authentication") ?></span>
  185. <span class="values-list-value"><?= _("Normal password") ?></span>
  186. </li>
  187. <li class="values-list-item">
  188. <span class="values-list-label">SSL/TLS</span>
  189. <span class="values-list-value"><?= _("Port") ?> 465</span>
  190. </li>
  191. <li class="values-list-item">
  192. <span class="values-list-label">STARTTLS</span>
  193. <span class="values-list-value"><?= _("Port") ?> 587</span>
  194. </li>
  195. <li class="values-list-item">
  196. <span class="values-list-label"><?= _("No encryption") ?></span>
  197. <span class="values-list-value"><?= _("Port") ?> 25</span>
  198. </li>
  199. </ul>
  200. </div>
  201. </div>
  202. </div>
  203. </div>
  204. </form>
  205. </div>