summaryrefslogtreecommitdiff
path: root/program/steps/mail
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2010-06-30 10:00:06 +0000
committeralecpl <alec@alec.pl>2010-06-30 10:00:06 +0000
commit4eb8493b40d72d7895b838234e4bc9bbd2b558ed (patch)
treee1cfd8e9e3a869d12f1b18bc315d6a32eeadc1e7 /program/steps/mail
parent3e58bf2062be1323d7c7c021d40255458e28e74d (diff)
- Fix body in message_sent hook when delay_file_io=true (#1486824)
Diffstat (limited to 'program/steps/mail')
-rw-r--r--program/steps/mail/func.inc8
1 files changed, 4 insertions, 4 deletions
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index e265c9c1e..4603ad908 100644
--- a/program/steps/mail/func.inc
+++ b/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);