]> git.eshelyaron.com Git - emacs.git/commitdiff
Ensure that `mail-send' breaks too-long lines
authorLars Ingebrigtsen <larsi@gnus.org>
Sun, 20 Feb 2022 12:41:57 +0000 (13:41 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Sun, 20 Feb 2022 12:41:57 +0000 (13:41 +0100)
* lisp/mail/sendmail.el (mail-send): Ensure that we fold too-long
lines when using `sendmail-user-agent' (bug#53412).

lisp/mail/sendmail.el

index 76c3baf47275dc3d3baf11dc145ff330e062a5b5..0d3eeecd8c8aa56fe3da0dbf4110ab37fb23e569 100644 (file)
@@ -955,7 +955,10 @@ the user from the mailer."
              (error "Invalid header line (maybe a continuation line lacks initial whitespace)"))
            (forward-line 1)))
        (goto-char opoint)
-       (when mail-encode-mml
+       (when (or mail-encode-mml
+                  ;; When we have long lines, we have to MIME encode
+                  ;; to get line folding.
+                  (mm-long-lines-p 1000))
          (mml-to-mime)
          (setq mail-encode-mml nil))
        (run-hooks 'mail-send-hook)