\r
function __construct() {\r
$this->SetLanguage("en", "lib/phpmailer/language/");\r
- //if SMTP_HOST is specified, use SMTP to send mail directly\r
+\r
if (SMTP_HOST) {\r
- $Host = SMTP_HOST;\r
+ $pair = explode(":", SMTP_HOST, 2);\r
$Mailer = "smtp";\r
+\r
+ $Host = $pair[0];\r
+ $Port = $pair[1];\r
+\r
+ if (!$Port) $Port = 25;\r
+ } else {\r
+ $Host = '';\r
+ $Port = '';\r
}\r
- //if SMTP_PORT is specified, assign it. Otherwise default to port 25\r
- if(SMTP_PORT){\r
- $Port = SMTP_PORT;\r
- }else{\r
- $Port = "25";\r
- }\r
+\r
\r
//if SMTP_LOGIN is specified, set credentials and enable auth\r
if(SMTP_LOGIN){\r