Add option to use envelope From address for MDN responses (#1488880)
| | |
| | | CHANGELOG Roundcube Webmail |
| | | =========================== |
| | | |
| | | - Add option to use envelope From address for MDN responses (#1488880) |
| | | - Add possibility to search in message body only (#1488770) |
| | | - Support "multipart/relative" as an alias for "multipart/related" type (#1488886) |
| | | - Display PGP/MIME signature attachments as "Digital Signature" (#1488570) |
| | |
| | | // send plaintext messages as format=flowed |
| | | $rcmail_config['send_format_flowed'] = true; |
| | | |
| | | // According to RFC2298, return receipt envelope sender address must be empty. |
| | | // If this option is true, Roundcube will use user's identity as envelope sender for MDN responses. |
| | | $rcmail_config['mdn_use_from'] = false; |
| | | |
| | | // Set identities access level: |
| | | // 0 - many identities with possibility to edit all params |
| | | // 1 - many identities with possibility to edit all params but not email address |
| | |
| | | } |
| | | |
| | | // RFC2298.3: remove envelope sender address |
| | | if (preg_match('/Content-Type: multipart\/report/', $text_headers) |
| | | if (empty($opts['mdn_use_from']) |
| | | && preg_match('/Content-Type: multipart\/report/', $text_headers) |
| | | && preg_match('/report-type=disposition-notification/', $text_headers) |
| | | ) { |
| | | $from = ''; |
| | |
| | | if ($agent = $RCMAIL->config->get('useragent')) |
| | | $headers['User-Agent'] = $agent; |
| | | |
| | | if ($RCMAIL->config->get('mdn_use_from')) |
| | | $options['mdn_use_from'] = true; |
| | | |
| | | $body = rcube_label("yourmessage") . "\r\n\r\n" . |
| | | "\t" . rcube_label("to") . ': ' . rcube_mime::decode_mime_string($message->headers->to, $message->headers->charset) . "\r\n" . |
| | | "\t" . rcube_label("subject") . ': ' . $message->subject . "\r\n" . |
| | |
| | | $compose->setTXTBody(rc_wordwrap($body, 75, "\r\n")); |
| | | $compose->addAttachment($report, 'message/disposition-notification', 'MDNPart2.txt', false, '7bit', 'inline'); |
| | | |
| | | $sent = rcmail_deliver_message($compose, $identity['email'], $mailto, $smtp_error, $body_file); |
| | | $sent = rcmail_deliver_message($compose, $identity['email'], $mailto, $smtp_error, $body_file, $options); |
| | | |
| | | if ($sent) |
| | | { |