Synch to Gnus 200305200437.
authoryamaoka <yamaoka>
Tue, 20 May 2003 05:03:20 +0000 (05:03 +0000)
committeryamaoka <yamaoka>
Tue, 20 May 2003 05:03:20 +0000 (05:03 +0000)
lisp/ChangeLog
lisp/message.el

index 295cfb0..02bb4c9 100644 (file)
@@ -1,3 +1,8 @@
+2003-05-20  Jesper Harder  <harder@ifa.au.dk>
+
+       * message.el (message-send-mail): Don't insert a courtesy copy
+       notice in base64 encoded messages.
+
 2003-05-16  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * gnus-sum.el (gnus-summary-move-article): Don't copy expirable
index 34475ec..8f5204f 100644 (file)
@@ -4027,6 +4027,9 @@ This sub function is for exclusive use of `message-send-mail'."
            (or (= (preceding-char) ?\n)
                (insert ?\n))
            (message-cleanup-headers)
+           ;; FIXME: we're inserting the courtesy copy after encoding.
+           ;; This is wrong if the courtesy copy string contains
+           ;; non-ASCII characters. -- jh
            (when
                (save-restriction
                  (message-narrow-to-headers)
@@ -4034,10 +4037,16 @@ This sub function is for exclusive use of `message-send-mail'."
                       (or (message-fetch-field "cc")
                           (message-fetch-field "bcc")
                           (message-fetch-field "to"))
-                      (let ((ct (mime-read-Content-Type)))
-                        (or (not ct)
-                            (and (eq 'text (cdr (assq 'type ct)))
-                                 (eq 'plain (cdr (assq 'subtype ct))))))))
+                      (let ((content-type (mime-read-Content-Type)))
+                        (and
+                         (or
+                          (not content-type)
+                          (and
+                           (eq 'text (cdr (assq 'type content-type)))
+                           (eq 'plain (cdr (assq 'subtype content-type)))))
+                         (not
+                          (string= "base64"
+                                   (mime-read-Content-Transfer-Encoding)))))))
              (message-insert-courtesy-copy))
            (setq failure (message-maybe-split-and-send-mail)))
        (kill-buffer tembuf))