From cead5c727147faac362e742aa7bcecf07f68cd99 Mon Sep 17 00:00:00 2001 From: thomascube <thomas@roundcube.net> Date: Thu, 18 May 2006 17:24:42 -0400 Subject: [PATCH] Updated CHANGELOG --- program/steps/mail/sendmail.inc | 22 +++++++++++++++++----- 1 files changed, 17 insertions(+), 5 deletions(-) diff --git a/program/steps/mail/sendmail.inc b/program/steps/mail/sendmail.inc index 70baba0..65365ea 100644 --- a/program/steps/mail/sendmail.inc +++ b/program/steps/mail/sendmail.inc @@ -136,6 +136,11 @@ $headers['X-Priority'] = sprintf("%d (%s)", $priority, ucfirst($str_priority)); } +if (!empty($_POST['_receipt'])) + { + $headers['Return-Receipt-To'] = $identity_arr['string']; + $headers['Disposition-Notification-To'] = $identity_arr['string']; + } // additional headers $headers['Message-ID'] = $message_id; @@ -159,9 +164,16 @@ } } - +// try to autodetect operating system and use the correct line endings // use the configured delimiter for headers -$header_delm = $CONFIG['mail_header_delimiter'] ? $CONFIG['mail_header_delimiter'] : "\r\n"; +if (!empty($CONFIG['mail_header_delimiter'])) + $header_delm = $CONFIG['mail_header_delimiter']; +else if (strtolower(substr(PHP_OS, 0, 3)=='win')) + $header_delm = "\r\n"; +else if (strtolower(substr(PHP_OS, 0, 3)=='mac')) + $header_delm = "\r\n"; +else + $header_delm = "\n"; // create PEAR::Mail_mime instance $MAIL_MIME = new Mail_mime($header_delm); @@ -274,12 +286,12 @@ // check if mailbox exists if (!in_array_nocase($CONFIG['sent_mbox'], $IMAP->list_mailboxes())) - $mbox = $IMAP->create_mailbox($CONFIG['sent_mbox'], TRUE); + $sent_folder = $IMAP->create_mailbox($CONFIG['sent_mbox'], TRUE); else - $mbox = TRUE; + $sent_folder = TRUE; // append message to sent box - if ($mbox) + if ($sent_folder) $saved = $IMAP->save_message($CONFIG['sent_mbox'], $header_str."\r\n".$msg_body); // raise error if saving failed -- Gitblit v1.9.1