summaryrefslogtreecommitdiff
path: root/roundcubemail/program/steps/mail/sendmail.inc
diff options
context:
space:
mode:
authorroundcube <roundcube@208e9e7b-5314-0410-a742-e7e81cd9613c>2006-01-05 00:37:10 +0000
committerroundcube <roundcube@208e9e7b-5314-0410-a742-e7e81cd9613c>2006-01-05 00:37:10 +0000
commit08da5273ebc148c320ae7f2b9ecd2b2b1c1bc5f0 (patch)
tree31be5d19550ab52a439bc399d215a1a5581fba97 /roundcubemail/program/steps/mail/sendmail.inc
parente786e636683429a4c57dbea03b4e35007a593371 (diff)
Optimized loading time; added periodic mail check; added EXPUNGE command
git-svn-id: https://svn.roundcube.net/trunk@93 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps/mail/sendmail.inc')
-rw-r--r--roundcubemail/program/steps/mail/sendmail.inc9
1 files changed, 6 insertions, 3 deletions
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");
}