+2010-09-29 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * nnimap.el (nnimap-insert-partial-structure): Get the type from the
+ correct slot, too.
+
2010-09-29 Julien Danjou <julien@danjou.info>
* gnus-util.el (gnus-icompleting-read): Require iswitchb. Fix history
t))
(defun nnimap-insert-partial-structure (structure parts &optional subp)
- (let ((type (car (last structure 4)))
- (boundary (let ((bstruc structure))
- (while (consp (car bstruc))
- (pop bstruc))
- (setq bstruc (car (cdr bstruc)))
- (and (stringp (car bstruc))
- (string= (downcase (car bstruc)) "boundary")
- (cadr bstruc)))))
+ (let (type boundary)
+ (let ((bstruc structure))
+ (while (consp (car bstruc))
+ (pop bstruc))
+ (setq type (car bstruc))
+ (setq bstruc (car (cdr bstruc)))
+ (when (and (stringp (car bstruc))
+ (string= (downcase (car bstruc)) "boundary"))
+ (setq boundary (cadr bstruc))))
(when subp
(insert (format "Content-type: multipart/%s; boundary=%S\n\n"
(downcase type) boundary)))