From dce33112a2e2a73acd08ee0dc80ca567f34c7065 Mon Sep 17 00:00:00 2001 From: Malf Furious Date: Mon, 29 May 2017 00:59:09 -0400 Subject: Add SMTP configuration variables --- app/class/settings.class.php | 50 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) (limited to 'app/class/settings.class.php') 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); + } } ?> -- cgit v1.2.3 From 8d382d0d86da37c9019de1717a75dc6e003f6388 Mon Sep 17 00:00:00 2001 From: Malf Furious Date: Mon, 29 May 2017 01:08:41 -0400 Subject: Change default SMTP port to 25 --- app/class/settings.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/class/settings.class.php') diff --git a/app/class/settings.class.php b/app/class/settings.class.php index abafd0a..5b7cdeb 100644 --- a/app/class/settings.class.php +++ b/app/class/settings.class.php @@ -111,7 +111,7 @@ abstract class settings */ public static function smtpPort(?int $value = NULL) : int { - return self::option("smtpPort", 0, $value); + return self::option("smtpPort", 25, $value); } /* -- cgit v1.2.3 From ae71ff561fb0e469b00dbe0942144f8a0b771246 Mon Sep 17 00:00:00 2001 From: Malf Furious Date: Mon, 19 Jun 2017 23:35:30 -0400 Subject: Add setting parameter 'smtpFrom' This is the name to give on FROM headers to generated email messages. --- app/class/settings.class.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'app/class/settings.class.php') diff --git a/app/class/settings.class.php b/app/class/settings.class.php index 5b7cdeb..19fba6a 100644 --- a/app/class/settings.class.php +++ b/app/class/settings.class.php @@ -98,6 +98,14 @@ abstract class settings return self::option("smtpEmailAddress", "", $value); } + /* + * SMTP FROM name + */ + public static function smtpFrom(?string $value = NULL) : string + { + return self::option("smtpFrom", "", $value); + } + /* * SMTP server address */ -- cgit v1.2.3