summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-06-30 10:00:06 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-06-30 10:00:06 +0000
commit60096e5d6132eb45aaf542c8c646ef677daf5104 (patch)
tree32055519ac88ebb8066bacd513f3eee251bc4518
parent5164328f9d632e1d9443569e03e1607bc7e8187b (diff)
- Fix body in message_sent hook when delay_file_io=true (#1486824)
git-svn-id: https://svn.roundcube.net/trunk@3796 208e9e7b-5314-0410-a742-e7e81cd9613c
-rw-r--r--roundcubemail/program/steps/mail/func.inc8
1 files changed, 4 insertions, 4 deletions
diff --git a/roundcubemail/program/steps/mail/func.inc b/roundcubemail/program/steps/mail/func.inc
index e265c9c1e..4603ad908 100644
--- a/roundcubemail/program/steps/mail/func.inc
+++ b/roundcubemail/program/steps/mail/func.inc
@@ -1374,10 +1374,6 @@ function rcmail_deliver_message(&$message, $from, $mailto, &$smtp_error, &$body_
$smtp_response = $RCMAIL->smtp->get_response();
$smtp_error = $RCMAIL->smtp->get_error();
- if (is_resource($msg_body)) {
- fclose($msg_body);
- }
-
// log error
if (!$sent)
raise_error(array('code' => 800, 'type' => 'smtp', 'line' => __LINE__, 'file' => __FILE__,
@@ -1442,6 +1438,10 @@ function rcmail_deliver_message(&$message, $from, $mailto, &$smtp_error, &$body_
}
}
+ if (is_resource($msg_body)) {
+ fclose($msg_body);
+ }
+
$message->_headers = array();
$message->headers($headers);