* lisp/gnus/mml.el (mml-insert-mime-headers): Implement the
already-documented "recipient-filename" parameter (bug#34654).
(or disposition
(mml-content-disposition type (cdr (assq 'filename cont)))))
(when parameters
- (mml-insert-parameter-string
- cont mml-content-disposition-parameters))
+ (let ((cont (copy-sequence cont)))
+ ;; Set the file name to what's specified by the user.
+ (when-let ((recipient-filename (cdr (assq 'recipient-filename cont))))
+ (setcdr cont
+ (cons (cons 'filename recipient-filename)
+ (cdr cont))))
+ (mml-insert-parameter-string
+ cont mml-content-disposition-parameters)))
(insert "\n"))
(unless (eq encoding '7bit)
(insert (format "Content-Transfer-Encoding: %s\n" encoding)))