]> git.wh0rd.org - tt-rss.git/blobdiff - classes/ttrssmailer.php
update: include detected language to article structure passed to filters
[tt-rss.git] / classes / ttrssmailer.php
index 1f365c22ed87e7c9083c07620223e1c6bf159f6b..64e8a59a75784a554cae8d45a540e1f2a5eab347 100644 (file)
@@ -17,35 +17,32 @@ class ttrssMailer extends PHPMailer {
                public $CharSet = "UTF-8";\r
                public $PluginDir = "lib/phpmailer/";\r
                public $ContentType = "text/html"; //default email type is HTML\r
-               public $Host;\r
-               public $Port;\r
-               public $SMTPAuth=False;\r
-               public $Username;\r
-               public $Password;\r
 \r
        function __construct() {\r
                $this->SetLanguage("en", "lib/phpmailer/language/");\r
 \r
-               if (SMTP_HOST) {\r
-                       $pair = explode(":", SMTP_HOST, 2);\r
-                       $Mailer = "smtp";\r
+               if (SMTP_SERVER) {\r
+                       $pair = explode(":", SMTP_SERVER, 2);\r
+                       $this->Mailer = "smtp";\r
 \r
-                       $Host = $pair[0];\r
-                       $Port = $pair[1];\r
+                       $this->Host = $pair[0];\r
+                       $this->Port = $pair[1];\r
 \r
-                       if (!$Port) $Port = 25;\r
+                       if (!$this->Port) $this->Port = 25;\r
                } else {\r
-                       $Host = '';\r
-                       $Port = '';\r
+                       $this->Host = '';\r
+                       $this->Port = '';\r
                }\r
 \r
 \r
                //if SMTP_LOGIN is specified, set credentials and enable auth\r
                if(SMTP_LOGIN){\r
-                       $SMTPAuth = true;\r
-                       $Username = SMTP_LOGIN;\r
-                       $Password = SMTP_PASSWORD;\r
+                       $this->SMTPAuth = true;\r
+                       $this->Username = SMTP_LOGIN;\r
+                       $this->Password = SMTP_PASSWORD;\r
                        }\r
+               if(SMTP_SECURE)
+                       $this->SMTPSecure = SMTP_SECURE;        
        }\r
        /*      @brief a simple mail function to send email using the defaults\r
        *       This will send an HTML email using the configured defaults\r