commit 19269f8c4d3d2c2c277715e7b47d9d81ef2c1978
parent 0c6385ef2b989fa26d2e17cdcdb71d305092572e
Author: Paul <paul@claws-mail.org>
Date: Tue, 13 Aug 2024 19:03:44 +0100
if a user choses to use 8bit content transfer encoding and wants to exceed the 998 byte line length limit, let them
Diffstat:
1 file changed, 17 insertions(+), 3 deletions(-)
diff --git a/src/compose.c b/src/compose.c
@@ -5855,9 +5855,23 @@ static gint compose_write_to_file(Compose *compose, FILE *fp, gint action, gbool
if (action == COMPOSE_WRITE_FOR_SEND &&
encoding != ENC_QUOTED_PRINTABLE && encoding != ENC_BASE64 &&
check_line_length(buf, 1000, &line) < 0) {
- debug_print("Line %d exceeds the line length limit (998 bytes), "
- "switching to QP transfer encoding\n", line + 1);
- encoding = ENC_QUOTED_PRINTABLE;
+ if (encoding == ENC_8BIT) {
+ AlertValue aval;
+
+ msg = g_strdup_printf
+ (_("Line %d exceeds the line length limit (998 bytes).\n"
+ "The contents of the message might be broken on the way "
+ "to the recipient."), line + 1);
+ aval = alertpanel(_("Warning"), msg, NULL, _("Send safely"), NULL, _("Send as-is"),
+ NULL, NULL, ALERTFOCUS_FIRST);
+ g_free(msg);
+ if (aval != G_ALERTALTERNATE)
+ encoding = ENC_QUOTED_PRINTABLE;
+ } else {
+ debug_print("Line %d exceeds the line length limit (998 bytes), "
+ "switching to QP transfer encoding\n", line + 1);
+ encoding = ENC_QUOTED_PRINTABLE;
+ }
}
if (prefs_common.rewrite_first_from && (encoding == ENC_8BIT || encoding == ENC_7BIT)) {