]> git.eshelyaron.com Git - emacs.git/commitdiff
lisp/gnus/message.el (message-send-mail): Don't wrongly assert on Unicode msg
authorOleh Krehel <ohwoeowho@gmail.com>
Mon, 3 Jun 2019 13:48:09 +0000 (15:48 +0200)
committerOleh Krehel <ohwoeowho@gmail.com>
Mon, 3 Jun 2019 13:48:09 +0000 (15:48 +0200)
Using this setting:

    (setq message-send-mail-function 'message-send-mail-with-sendmail)
    (setq sendmail-program "msmtp")

the message seding is handled by an external program, so no Unicode
encoding is performed in Emacs. Thus Emacs must not assert that the
Unicode encoding was performed.

lisp/gnus/message.el

index 29a8f25f31f21e7b56545289b509cce51e2ae91e..adaaa7e5f21927ecfc561ab2aa148da9d3fa75ae 100644 (file)
@@ -4593,10 +4593,12 @@ This function could be useful in `message-setup-hook'."
            (message-insert-courtesy-copy
             (with-current-buffer mailbuf
               message-courtesy-message)))
-          ;; Let's make sure we encoded all the body.
-          (cl-assert (save-excursion
-                       (goto-char (point-min))
-                       (not (re-search-forward "[^\000-\377]" nil t))))
+          ;; If this was set, let `sendmail-program' handle the Unicode
+          (unless message-inhibit-body-encoding
+            ;; Let's make sure we encoded all the body.
+            (cl-assert (save-excursion
+                         (goto-char (point-min))
+                         (not (re-search-forward "[^\000-\377]" nil t)))))
           (mm-disable-multibyte)
          (if (or (not message-send-mail-partially-limit)
                  (< (buffer-size) message-send-mail-partially-limit)