GNU bug report logs - #34654
Attaching a file with a new name in a message

Previous Next

Package: emacs;

Reported by: Abdo Haji-Ali <abdo.haji.ali <at> gmail.com>

Date: Mon, 25 Feb 2019 20:40:01 UTC

Severity: normal

Tags: fixed

Fixed in version 27.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Federico Tedin <federicotedin <at> gmail.com>
To: Abdo Haji-Ali <abdo.haji.ali <at> gmail.com>
Cc: 34654 <at> debbugs.gnu.org
Subject: bug#34654: Attaching a file with a new name in a message
Date: Sat, 30 Mar 2019 22:23:45 -0300
Abdo Haji-Ali <abdo.haji.ali <at> gmail.com> writes:

> Hello,
>
> I am using Emacs 26.1 to send my emails. While writing an email, I
> attach files by calling
> `mail-attach-file` (bound to C-c C-a on my setup)
> I usually want to rename the file before sending so that my local file
> name doesn't appear to the recipient. I found in the docs that setting
> the properties 'recipient-filename' or 'name' in the <part> tag should
> do the trick. However, this doesn't seem to be the case, since my
> recipients are still receiving files with my original filenames.
> Looking at the raw message I found in the header
>
> Content-Disposition: attachment; filename="old-name.pdf"
>
> Even when I set the 'recipient-filename' and 'name' properties.
> Looking through the source, it seems that line 904 in mml.el always
> sets the Content-Disposition filename to the original filename,
> disregarding the 'recipient-filename' and 'name' properties.
>
> Is this intentional? Is there another to achieve what I want?

Adding 'recipient-filename to mml-content-disposition-parameters makes
future messages include the property in the "Content-Disposition"
header. However, the "filename" property is still sent, and my email
client (GMail) uses "filename" and not "recipient-filename" to display
the attachment file name. Maybe Emacs should replace the contents of
"filename" with the ones of "recipient-filename"?




This bug report was last modified 6 years and 6 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.