(mml-insert-mime-headers-always): New variable.
authorSimon Josefsson <jas@extundo.com>
Mon, 1 Sep 2003 09:02:01 +0000 (09:02 +0000)
committerSimon Josefsson <jas@extundo.com>
Mon, 1 Sep 2003 09:02:01 +0000 (09:02 +0000)
(mml-insert-mime-headers): Use it.  Based on patch from Lars
Balker Rasmussen <lars@balker.org>.

lisp/ChangeLog
lisp/mml.el

index c9f5c83..d45ff58 100644 (file)
@@ -1,3 +1,9 @@
+2003-09-01  Simon Josefsson  <jas@extundo.com>
+
+       * mml.el (mml-insert-mime-headers-always): New variable.
+       (mml-insert-mime-headers): Use it.  Based on patch from Lars
+       Balker Rasmussen <lars@balker.org>.
+
 2003-08-30  Simon Josefsson  <jas@extundo.com>
 
        * mail-source.el (mail-source-fetch-imap): Pass correct buffer to
index de52030..1887754 100644 (file)
@@ -54,6 +54,12 @@ These parameters are generated in Content-Disposition header if exists."
   :type '(repeat (symbol :tag "Parameter"))
   :group 'message)
 
+(defcustom mml-insert-mime-headers-always nil
+  "If non-nil, always put Content-Type: text/plain at top of empty parts.
+It is necessary to work against a bug in certain clients."
+  :type 'boolean
+  :group 'message)
+
 (defvar mml-tweak-type-alist nil
   "A list of (TYPE . FUNCTION) for tweaking MML parts.
 TYPE is a string containing a regexp to match the MIME type.  FUNCTION
@@ -608,7 +614,8 @@ If MML is non-nil, return the buffer up till the correspondent mml tag."
     (when (or charset
              parameters
              flowed
-             (not (equal type mml-generate-default-type)))
+             (not (equal type mml-generate-default-type))
+             mml-insert-mime-headers-always)
       (when (consp charset)
        (error
         "Can't encode a part with several charsets"))