emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 83c3a61: lisp/gnus/message.el (message-send-mail):


From: Oleh Krehel
Subject: [Emacs-diffs] master 83c3a61: lisp/gnus/message.el (message-send-mail): Don't wrongly assert on Unicode msg
Date: Mon, 3 Jun 2019 09:56:27 -0400 (EDT)

branch: master
commit 83c3a61e4ca091580cafbabe34b54e4a9261ad16
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    lisp/gnus/message.el (message-send-mail): Don't wrongly assert on Unicode 
msg
    
    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 | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index 29a8f25..adaaa7e 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]