<configinteger name="attach_count_limit" desc="What is the maximum total
number of attachments per message? Set this value to 0 for no
limit.">0</configinteger>
+ <configboolean name="convert_to_related" desc="When composing a message in
+ HTML mode, should we download the data for any images contained in the
+ message and directly attach to the message? This is highly recommended as
+ the image data may not otherwise be available when the recipient views
+ the message in the future. This should be turned off for servers that are
+ firewalled or otherwise have limited Internet
+ connectivity.">true</configboolean>
<configinteger name="reply_limit" desc="What is the maximum total size of
text (in bytes) to use when replying or forwarding a message. Set this value
to 0 for no limit.">200000</configinteger>
v5.0-git
--------
+[mms] Add config option to disable multipart/related conversions
+ (Request #9099).
[mms] Sentmail SQL driver now supports split read/write operation.
[mms] Pass compose message data to mailer backend via stream; much more
efficient, especially with larger messages (Request #8909).
$textpart->setHeaderCharset($charset);
if (empty($options['nofinal'])) {
- $textpart->addPart($this->_convertToMultipartRelated($htmlBody));
- } else {
- $textpart->addPart($htmlBody);
+ try {
+ $htmlBody = $this->_convertToMultipartRelated($htmlBody);
+ } catch (Horde_Exception $e) {}
}
+
+ $textpart->addPart($htmlBody);
} else {
$textpart = $textBody;
}
{
global $conf;
- /* Return immediately if this is not a HTML part, or no 'img' tags are
+ /* Return immediately if related conversion is turned off via
+ * configuration, this is not a HTML part, or no 'img' tags are
* found (specifically searching for the 'src' parameter). */
- if (($mime_part->getType() != 'text/html') ||
+ if (empty($conf['compose']['convert_to_related']) ||
+ ($mime_part->getType() != 'text/html') ||
!preg_match_all('/<img[^>]+src\s*\=\s*([^\s]+)\s+/iU', $mime_part->getContents(), $results)) {
return $mime_part;
}