summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMalf Furious <m@lfurio.us>2017-05-29 00:59:09 -0400
committerMalf Furious <m@lfurio.us>2017-06-19 23:57:39 -0400
commitdce33112a2e2a73acd08ee0dc80ca567f34c7065 (patch)
tree57da6955e510a312eada296caca74f5fa12b944f
parent2376aabe74528b018189982224d61a643325b114 (diff)
downloadscrott-dce33112a2e2a73acd08ee0dc80ca567f34c7065.tar.gz
scrott-dce33112a2e2a73acd08ee0dc80ca567f34c7065.zip
Add SMTP configuration variables
-rw-r--r--app/class/settings.class.php50
1 files changed, 50 insertions, 0 deletions
diff --git a/app/class/settings.class.php b/app/class/settings.class.php
index 5609605..abafd0a 100644
--- a/app/class/settings.class.php
+++ b/app/class/settings.class.php
@@ -89,6 +89,56 @@ abstract class settings
{
return self::option("allowPublicSignup", false, $value);
}
+
+ /*
+ * SMTP email address
+ */
+ public static function smtpEmailAddress(?string $value = NULL) : string
+ {
+ return self::option("smtpEmailAddress", "", $value);
+ }
+
+ /*
+ * SMTP server address
+ */
+ public static function smtpServer(?string $value = NULL) : string
+ {
+ return self::option("smtpServer", "", $value);
+ }
+
+ /*
+ * SMTP port number
+ */
+ public static function smtpPort(?int $value = NULL) : int
+ {
+ return self::option("smtpPort", 0, $value);
+ }
+
+ /*
+ * SMTP security
+ * Should be '', 'ssl', or 'tls'. See the 'SMTPSecure' property
+ * from PHP Mailer module.
+ */
+ public static function smtpSecurity(?string $value = NULL) : string
+ {
+ return self::option("smtpSecurity", "", $value);
+ }
+
+ /*
+ * SMTP username
+ */
+ public static function smtpUname(?string $value = NULL) : string
+ {
+ return self::option("smtpUname", "", $value);
+ }
+
+ /*
+ * SMTP password
+ */
+ public static function smtpPasswd(?string $value = NULL) : string
+ {
+ return self::option("smtpPasswd", "", $value);
+ }
}
?>