diff options
author | alecpl <alec@alec.pl> | 2009-03-01 07:55:39 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2009-03-01 07:55:39 +0000 |
commit | d519ef8a0a24e5cfcc13f136047dcabb504e9c1d (patch) | |
tree | a49f45a9fb2a522f28b3ef458386ce480c92a24b /program | |
parent | b423156d598778758626682515ae51881f0eb95a (diff) |
- Fix attaching more than nine inline images (#1485759)
Diffstat (limited to 'program')
-rw-r--r-- | program/steps/mail/sendmail.inc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/program/steps/mail/sendmail.inc b/program/steps/mail/sendmail.inc index b16226075..eb81fc9ad 100644 --- a/program/steps/mail/sendmail.inc +++ b/program/steps/mail/sendmail.inc @@ -337,11 +337,11 @@ $transfer_encoding = in_array(strtoupper($message_charset), $charset_7bit) ? '7b if (is_array($_SESSION['compose']['attachments'])) foreach ($_SESSION['compose']['attachments'] as $id => $attachment) { - $dispurl = '/\ssrc\s*=\s*[\'"]?\S+display-attachment\S+file=rcmfile' . $id . '[\'"]?/'; - $match = preg_match($dispurl, $message_body); + $dispurl = '/\ssrc\s*=\s*[\'"]*\S+display-attachment\S+file=rcmfile' . $id . '[\s\'"]\s*/'; + $match = preg_match($dispurl, $message_body, $matches); if ($isHtml && ($match > 0)) { - $message_body = preg_replace($dispurl, ' src="'.$attachment['name'].'"', $message_body); + $message_body = preg_replace($dispurl, ' src="'.$attachment['name'].'" ', $message_body); $MAIL_MIME->setHTMLBody($message_body. ($footer ? "\r\n<pre>".$footer.'</pre>' : '')); $MAIL_MIME->addHTMLImage($attachment['path'], $attachment['mimetype'], $attachment['name']); } |