From 08da5273ebc148c320ae7f2b9ecd2b2b1c1bc5f0 Mon Sep 17 00:00:00 2001 From: roundcube Date: Thu, 5 Jan 2006 00:37:10 +0000 Subject: Optimized loading time; added periodic mail check; added EXPUNGE command git-svn-id: https://svn.roundcube.net/trunk@93 208e9e7b-5314-0410-a742-e7e81cd9613c --- roundcubemail/program/steps/mail/sendmail.inc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'roundcubemail/program/steps/mail/sendmail.inc') diff --git a/roundcubemail/program/steps/mail/sendmail.inc b/roundcubemail/program/steps/mail/sendmail.inc index 3c9f60378..c29fcf1d3 100644 --- a/roundcubemail/program/steps/mail/sendmail.inc +++ b/roundcubemail/program/steps/mail/sendmail.inc @@ -224,14 +224,17 @@ else { // unset some headers because they will be added by the mail() function $headers_php = $headers; + $headers_enc = $MAIL_MIME->headers($headers); unset($headers_php['To'], $headers_php['Subject']); + // reset stored headers and overwrite + $MAIL_MIME->_headers = array(); $header_str = $MAIL_MIME->txtHeaders($headers_php); if(ini_get('safe_mode')) - $sent = mail($mailto, $msg_subject, $msg_body, $header_str); - else - $sent = mail($mailto, $msg_subject, $msg_body, $header_str, "-f$from"); + $sent = mail($headers_enc['To'], $headers_enc['Subject'], $msg_body, $header_str); + else + $sent = mail($headers_enc['To'], $headers_enc['Subject'], $msg_body, $header_str, "-f$from"); } -- cgit v1.2.3