From 521bea4bd8f2e462df3cf79fa5f2230a00e1115c Mon Sep 17 00:00:00 2001
From: prashant <prashant@jois.ca>
Date: Tue, 23 Jun 2015 18:09:14 -0400
Subject: [PATCH] Merge branch 'master' of https://github.com/roundcube/roundcubemail
---
program/lib/Roundcube/rcube_smtp.php | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/program/lib/Roundcube/rcube_smtp.php b/program/lib/Roundcube/rcube_smtp.php
index a2d130e..bb1d2c8 100644
--- a/program/lib/Roundcube/rcube_smtp.php
+++ b/program/lib/Roundcube/rcube_smtp.php
@@ -208,11 +208,6 @@
else if (is_string($headers)) {
$text_headers = $headers;
}
- else {
- $this->reset();
- $this->response[] = "Invalid message headers";
- return false;
- }
// exit if no from address is given
if (!isset($from)) {
@@ -275,8 +270,11 @@
if (is_resource($body)) {
// file handle
- $data = $body;
- $text_headers = preg_replace('/[\r\n]+$/', '', $text_headers);
+ $data = $body;
+
+ if ($text_headers) {
+ $text_headers = preg_replace('/[\r\n]+$/', '', $text_headers);
+ }
}
else {
// Concatenate headers and body so it can be passed by reference to SMTP_CONN->data
--
Gitblit v1.9.1