diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d40f241019..31b162c8a43 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ - Add possibility to change ATTR_EMULATE_PREPARES via config file (#9213) - Use draft settings (like DSN) on "Edit as new" (#9349) - Use new HTML5 parser available on PHP >= 8.4 +- Allow hiding the "Keep formatting" option (via `dont_override`) when composing an email (#9704) - Installer: Show NOT OK if none of the database extensions is installed (#9594, #9604) - Mailvelope: Add a button to enable the extension for webmail domain (#9498) - OAuth: Add support for SMTP without authentication (#9183) diff --git a/program/actions/mail/send.php b/program/actions/mail/send.php index f0e63445d21..d53f04d2d0b 100644 --- a/program/actions/mail/send.php +++ b/program/actions/mail/send.php @@ -47,6 +47,11 @@ public function run($args = []) $saveonly = !empty($_GET['_saveonly']); $savedraft = !empty($_POST['_draft']) && !$saveonly; + if (in_array('keep_formatting', $rcmail->config->get('dont_override', []), true)) { + $keepformatting = !empty($rcmail->config->get('keep_formatting', false)); + } else { + $keepformatting = !empty($_POST['_keepformatting']); + } $SENDMAIL = new rcmail_sendmail($COMPOSE, [ 'sendmail' => true, 'saveonly' => $saveonly, @@ -55,7 +60,7 @@ public function run($args = []) call_user_func_array([$rcmail->output, 'show_message'], $args); $rcmail->output->send('iframe'); }, - 'keepformatting' => !empty($_POST['_keepformatting']), + 'keepformatting' => $keepformatting, ]); // Collect input for message headers diff --git a/skins/elastic/templates/compose.html b/skins/elastic/templates/compose.html index 0f7cad8caf0..18d9c30c69d 100644 --- a/skins/elastic/templates/compose.html +++ b/skins/elastic/templates/compose.html @@ -46,12 +46,14 @@

+