Aleksander Machniak
2015-01-03 10f133bae8499d493a3cc17e10adc7399e6e3b39
program/steps/mail/sendmail.inc
@@ -428,8 +428,7 @@
        $attachment = $RCMAIL->plugins->exec_hook('attachment_get', $attachment);
        if ($isHtml) {
            $dispurl      = '/\s(poster|src)\s*=\s*[\'"]*\S+display-attachment\S+file=rcmfile'
                . preg_quote($attachment['id']) . '[\s\'"]*/';
            $dispurl      = '/[\'"]\S+display-attachment\S+file=rcmfile' . preg_quote($attachment['id']) . '[\'"]/';
            $message_body = $MAIL_MIME->getHTMLBody();
            $is_inline    = preg_match($dispurl, $message_body);
        }
@@ -449,7 +448,7 @@
                $cid .= '@localhost';
            }
            $message_body = preg_replace($dispurl, ' \\1="cid:' . $cid . '" ', $message_body);
            $message_body = preg_replace($dispurl, '"cid:' . $cid . '"', $message_body);
            $MAIL_MIME->setHTMLBody($message_body);
@@ -469,7 +468,8 @@
                $attachment['data'] ? false : true,
                $ctype == 'message/rfc822' ? '8bit' : 'base64',
                'attachment',
                '', '', '',
                $attachment['charset'],
                '', '',
                $folding ? 'quoted-printable' : NULL,
                $folding == 2 ? 'quoted-printable' : NULL,
                '', RCUBE_CHARSET
@@ -564,9 +564,11 @@
    $store_target = $drafts_mbox;
}
else if (!$RCMAIL->config->get('no_save_sent_messages')) {
    $store_target = rcube_utils::get_input_value('_store_target', rcube_utils::INPUT_POST);
    if (!strlen($store_target)) {
        $sore_target = $RCMAIL->config->get('sent_mbox');
    if (isset($_POST['_store_target'])) {
        $store_target = rcube_utils::get_input_value('_store_target', rcube_utils::INPUT_POST);
    }
    else {
        $store_target = $RCMAIL->config->get('sent_mbox');
    }
}