summaryrefslogtreecommitdiff
path: root/lisp/mail
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2006-01-21 13:16:05 +0000
committerEli Zaretskii <eliz@gnu.org>2006-01-21 13:16:05 +0000
commit5ef9bccd0682263c463edb41a73f352b584ef5a3 (patch)
treec189edc612dc5827910bf829b72305d5c8de8113 /lisp/mail
parentf60117ac2980966dc0de0fd1fd5447eb17589a3f (diff)
downloademacs-5ef9bccd0682263c463edb41a73f352b584ef5a3.tar.gz
(rmail-output): Don't use content-type if it is nil.
Diffstat (limited to 'lisp/mail')
-rw-r--r--lisp/mail/rmailout.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/mail/rmailout.el b/lisp/mail/rmailout.el
index 97654ae92c5..bd37a41aef8 100644
--- a/lisp/mail/rmailout.el
+++ b/lisp/mail/rmailout.el
@@ -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.)