summaryrefslogtreecommitdiff
path: root/program/steps/mail/sendmail.inc
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2006-01-05 00:37:10 +0000
committerthomascube <thomas@roundcube.net>2006-01-05 00:37:10 +0000
commit15a9d1ce671fcbc44ea3e4858d7aa6f5b22300c9 (patch)
tree30e15c3f52ff435d5b08691424515995d8b077c9 /program/steps/mail/sendmail.inc
parent977a295eb1e97e0c230063da40b8296fca778814 (diff)
Optimized loading time; added periodic mail check; added EXPUNGE command
Diffstat (limited to 'program/steps/mail/sendmail.inc')
-rw-r--r--program/steps/mail/sendmail.inc9
1 files changed, 6 insertions, 3 deletions
diff --git a/program/steps/mail/sendmail.inc b/program/steps/mail/sendmail.inc
index 3c9f60378..c29fcf1d3 100644
--- a/program/steps/mail/sendmail.inc
+++ b/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");
}