Changeset 5852c14d in github
- Timestamp:
- Jun 11, 2010 9:57:02 AM (3 years ago)
- Branches:
- master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
- Children:
- 0133e6b
- Parents:
- 93e3ae1
- Files:
-
- 3 edited
-
CHANGELOG (modified) (1 diff)
-
config/main.inc.php.dist (modified) (1 diff)
-
program/steps/mail/sendmail.inc (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
CHANGELOG
r349a8e3 r5852c14d 2 2 =========================== 3 3 4 - Add option to set separate footer for HTML messages (#1486660) 4 5 - Add real SMTP error description to displayed error messages (#1485927) 5 6 - Fix some IMAP errors handling when opening the message (#1485443) -
config/main.inc.php.dist
r6a642d1 r5852c14d 225 225 // paths are relative to the RoundCube root folder 226 226 $rcmail_config['generic_message_footer'] = ''; 227 228 // path to a text file which will be added to each sent HTML message 229 // paths are relative to the RoundCube root folder 230 $rcmail_config['generic_message_footer_html'] = ''; 227 231 228 232 // add a received header to outgoing mails containing the creators IP and hostname -
program/steps/mail/sendmail.inc
rac8edbe r5852c14d 385 385 '<blockquote type="cite" style="'.$bstyle.'">', $message_body); 386 386 } 387 387 388 // generic footer for all messages 388 if (!empty($CONFIG['generic_message_footer'])) { 389 if ($isHtml && !empty($CONFIG['generic_message_footer_html'])) { 390 $footer = file_get_contents(realpath($CONFIG['generic_message_footer_html'])); 391 $footer = rcube_charset_convert($footer, RCMAIL_CHARSET, $message_charset); 392 } 393 else if (!empty($CONFIG['generic_message_footer'])) { 389 394 $footer = file_get_contents(realpath($CONFIG['generic_message_footer'])); 390 395 $footer = rcube_charset_convert($footer, RCMAIL_CHARSET, $message_charset); 391 } 396 if ($isHtml) 397 $footer = '<pre>'.$footer.'</pre>'; 398 } 399 if ($footer) 400 $message_body .= "\r\n" . $footer; 392 401 } 393 402 … … 423 432 array('body' => $message_body, 'type' => 'html', 'message' => $MAIL_MIME)); 424 433 425 $MAIL_MIME->setHTMLBody($plugin['body'] . ($footer ? "\r\n<pre>".$footer.'</pre>' : ''));434 $MAIL_MIME->setHTMLBody($plugin['body']); 426 435 427 436 // add a plain text version of the e-mail as an alternative part. 428 437 $h2t = new html2text($plugin['body'], false, true, 0); 429 $plainTextPart = rc_wordwrap($h2t->get_text(), $LINE_LENGTH, "\r\n") . ($footer ? "\r\n".$footer : '');438 $plainTextPart = rc_wordwrap($h2t->get_text(), $LINE_LENGTH, "\r\n"); 430 439 $plainTextPart = wordwrap($plainTextPart, 998, "\r\n", true); 431 if (! strlen($plainTextPart)) {440 if (!$plainTextPart) { 432 441 // empty message body breaks attachment handling in drafts 433 442 $plainTextPart = "\r\n"; … … 448 457 } 449 458 else { 450 if ($footer) 451 $message_body .= "\r\n" . $footer; 452 459 $plugin = $RCMAIL->plugins->exec_hook('outgoing_message_body', 460 array('body' => $message_body, 'type' => 'plain', 'message' => $MAIL_MIME)); 461 462 $message_body = $plugin['body']; 463 453 464 // compose format=flowed content if enabled and not a reply message 454 465 if (empty($_SESSION['compose']['reply_msgid']) && ($flowed = $RCMAIL->config->get('send_format_flowed', true))) … … 456 467 else 457 468 $message_body = rc_wordwrap($message_body, $LINE_LENGTH, "\r\n"); 458 469 459 470 $message_body = wordwrap($message_body, 998, "\r\n", true); 460 471 if (!strlen($message_body)) { … … 463 474 } 464 475 465 $plugin = $RCMAIL->plugins->exec_hook('outgoing_message_body', 466 array('body' => $message_body, 'type' => 'plain', 'message' => $MAIL_MIME)); 467 468 $MAIL_MIME->setTXTBody($plugin['body'], false, true); 476 $MAIL_MIME->setTXTBody($message_body, false, true); 469 477 } 470 478
Note: See TracChangeset
for help on using the changeset viewer.
