]> git.eshelyaron.com Git - emacs.git/commitdiff
(rmail-output): Don't use content-type if it is nil.
authorEli Zaretskii <eliz@gnu.org>
Sat, 21 Jan 2006 13:16:05 +0000 (13:16 +0000)
committerEli Zaretskii <eliz@gnu.org>
Sat, 21 Jan 2006 13:16:05 +0000 (13:16 +0000)
lisp/mail/rmailout.el

index 97654ae92c55135bb7f7d152623ea2f9febf180f..bd37a41aef88ba7dfa69531dfb71691ee5582dc8 100644 (file)
@@ -349,9 +349,11 @@ The optional fourth argument FROM-GNUS is set when called from GNUS."
                                                 (mail-fetch-field "sender")
                                                 "unknown"))
                    " " (current-time-string) "\n"))
-         (if mime-version
-             (insert "MIME-Version: " mime-version
-                     "\nContent-type: " content-type "\n"))
+         (when mime-version
+           (insert "MIME-Version: " mime-version)
+           ;; Some malformed MIME messages set content-type to nil.
+           (when content-type
+             (insert "\nContent-type: " content-type "\n")))
          ;; ``Quote'' "\nFrom " as "\n>From "
          ;;  (note that this isn't really quoting, as there is no requirement
          ;;   that "\n[>]+From " be quoted in the same transparent way.)