summaryrefslogtreecommitdiff
path: root/program/include/rcmail.php
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2009-07-21 12:31:59 +0000
committeralecpl <alec@alec.pl>2009-07-21 12:31:59 +0000
commit2c3d81dddd8d931385022a065515d6ef42d7fb7d (patch)
tree6593a8c50717d578bb67590b27dba819f1acf5a8 /program/include/rcmail.php
parenta07ab6da091e8a476b04eec5f7e1807599cdd278 (diff)
- use simple rcube_smtp class
- Installer: fix SMTP settings test
Diffstat (limited to 'program/include/rcmail.php')
-rw-r--r--program/include/rcmail.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/program/include/rcmail.php b/program/include/rcmail.php
index 627a8f290..a508e1718 100644
--- a/program/include/rcmail.php
+++ b/program/include/rcmail.php
@@ -35,6 +35,7 @@ class rcmail
public $config;
public $user;
public $db;
+ public $smtp;
public $imap;
public $output;
public $plugins;
@@ -338,6 +339,20 @@ class rcmail
return $this->output;
}
+
+
+ /**
+ * Create SMTP object and connect to server
+ *
+ * @param boolean True if connection should be established
+ */
+ public function smtp_init($connect = false)
+ {
+ $this->smtp = new rcube_smtp();
+
+ if ($connect)
+ $this->smtp->connect();
+ }
/**
@@ -842,6 +857,9 @@ class rcmail
$this->imap->write_cache();
}
+ if (is_object($this->smtp))
+ $this->smtp->disconnect();
+
if (is_object($this->contacts))
$this->contacts->close();