From 69baeefab31dda8ffcc43e0636bb93157e2eee4f Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Fri, 13 Apr 2012 11:56:28 -0400
Subject: [PATCH] allow read-only access to rcube_output::$env
---
program/include/rcube_smtp.php | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/program/include/rcube_smtp.php b/program/include/rcube_smtp.php
index e1a6f3a..0923e3b 100644
--- a/program/include/rcube_smtp.php
+++ b/program/include/rcube_smtp.php
@@ -6,7 +6,10 @@
| |
| This file is part of the Roundcube Webmail client |
| Copyright (C) 2005-2010, The Roundcube Dev Team |
- | Licensed under the GNU GPL |
+ | |
+ | Licensed under the GNU General Public License version 3 or |
+ | any later version with exceptions for skins & plugins. |
+ | See the README file for a full license statement. |
| |
| PURPOSE: |
| Provide SMTP functionality using socket connections |
@@ -49,7 +52,7 @@
*/
public function connect($host=null, $port=null, $user=null, $pass=null)
{
- $RCMAIL = rcmail::get_instance();
+ $RCMAIL = rcube::get_instance();
// disconnect/destroy $this->conn
$this->disconnect();
@@ -71,7 +74,7 @@
'smtp_auth_callbacks' => array(),
));
- $smtp_host = rcube_parse_host($CONFIG['smtp_server']);
+ $smtp_host = rcmail::parse_host($CONFIG['smtp_server']);
// when called from Installer it's possible to have empty $smtp_host here
if (!$smtp_host) $smtp_host = 'localhost';
$smtp_port = is_numeric($CONFIG['smtp_port']) ? $CONFIG['smtp_port'] : 25;
@@ -335,7 +338,7 @@
*/
public function debug_handler(&$smtp, $message)
{
- write_log('smtp', preg_replace('/\r\n$/', '', $message));
+ rcmail::write_log('smtp', preg_replace('/\r\n$/', '', $message));
}
@@ -390,7 +393,7 @@
$from = $addresses[0];
// Reject envelope From: addresses with spaces.
- if (strstr($from, ' '))
+ if (strpos($from, ' ') !== false)
return false;
$lines[] = $key . ': ' . $value;
--
Gitblit v1.9.1