Permalink
Browse files

Fixed mail ssl default settings (bug http://www.wikidot.org/bug:19)

  • Loading branch information...
1 parent 405a38e commit d1a4ffff02e3b75a5734f00ed41fcda7cda06133 Piotr Gabryjeluk committed Jul 23, 2009
Showing with 7 additions and 2 deletions.
  1. +5 −0 conf/full-example-of-wikidot.ini
  2. +2 −2 php/utils/GlobalProperties.php
View
5 conf/full-example-of-wikidot.ini
@@ -106,7 +106,12 @@ highlight = false
; SMTP host
host = 127.0.0.1
+; SMTP ssl
+ssl = false
+
; SMTP port
+; 25 if ssl = false
+; 465 if ssl = true
port = 25
; SMTP needs authenticating?
View
4 php/utils/GlobalProperties.php
@@ -206,10 +206,10 @@ public static function init() {
// mail settings
self::$DEFAULT_SMTP_HOST = self::fromIni("mail", "host", "127.0.0.1");
- self::$DEFAULT_SMTP_PORT = self::fromIni("mail", "port", 25);
+ self::$DEFAULT_SMTP_SECURE = self::fromIni("mail", "ssl", false) ? "ssl" : "";
+ self::$DEFAULT_SMTP_PORT = self::fromIni("mail", "port", (self::$DEFAULT_SMTP_SECURE == "ssl") ? 465 : 25);
self::$DEFAULT_SMTP_USER = self::fromIni("mail", "user", "admin");
self::$DEFAULT_SMTP_PASSWORD = self::fromIni("mail", "password", "");
- self::$DEFAULT_SMTP_SECURE = self::fromIni("mail", "ssl", false) ? "ssl" : "";
self::$DEFAULT_SMTP_AUTH = self::fromIni("mail", "auth", false);
self::$DEFAULT_SMTP_HOSTNAME = self::fromIni("mail", "hostname", self::$DEFAULT_SMTP_HOST);
self::$DEFAULT_SMTP_FROM_EMAIL = self::fromIni("mail", "from_mail", (strstr(self::$DEFAULT_SMTP_USER, "@")) ? self::$DEFAULT_SMTP_USER : self::$DEFAULT_SMTP_USER . "@" . self::$DEFAULT_SMTP_HOSTNAME);

0 comments on commit d1a4fff

Please sign in to comment.