From unknown Tue Jun 17 01:43:23 2025 X-Loop: help-debbugs@gnu.org Subject: bug#34654: Attaching a file with a new name in a message Resent-From: Abdo Haji-Ali Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 25 Feb 2019 20:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 34654 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 34654@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.155112717415369 (code B ref -1); Mon, 25 Feb 2019 20:40:01 +0000 Received: (at submit) by debbugs.gnu.org; 25 Feb 2019 20:39:34 +0000 Received: from localhost ([127.0.0.1]:51773 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gyN2E-0003zp-1F for submit@debbugs.gnu.org; Mon, 25 Feb 2019 15:39:34 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46525) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gyLDe-0001Ek-Nk for submit@debbugs.gnu.org; Mon, 25 Feb 2019 13:43:15 -0500 Received: from lists.gnu.org ([209.51.188.17]:33284) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gyLDZ-00023E-DX for submit@debbugs.gnu.org; Mon, 25 Feb 2019 13:43:09 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60818) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gyLDY-0002fz-2V for bug-gnu-emacs@gnu.org; Mon, 25 Feb 2019 13:43:09 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gyLDX-0001zO-9X for bug-gnu-emacs@gnu.org; Mon, 25 Feb 2019 13:43:07 -0500 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]:39563) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gyLDW-0001jD-Ui for bug-gnu-emacs@gnu.org; Mon, 25 Feb 2019 13:43:07 -0500 Received: by mail-wm1-x333.google.com with SMTP id z84so189244wmg.4 for ; Mon, 25 Feb 2019 10:42:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=8Zi9gDcpgvkQ+f+A6rpjVIJnHZS9bBhaqFj/Zs5i0eQ=; b=FbE9YtjRCKsAjM7/OHzpoLJUgg3Ttg5Ga5cGiUJXIBKM3No5qZQqYKZKQx2ZERBrjz ZjSy6s/q5C9o/HUvpZlDihRtuDOhPxxFsKFdmsAJUIxMLdzuHkHpcF6s37F2TSVQAwsI b92CVNf8fEDBg8+ynI1cZbJ1hRqEckNCTvdkXOc99viN82BiCN21rUUr7LH7hvPdjjYy BEWHKmzX7W4qtxrCZ4Pa2WBi9PU/N1efaTf7FzQsEpbl6jGhSHnyWjFX9jcpMTqSIMCF C9x7vNpWPNA7FEkF7iBV71NsDk+1HMCObrICuHP/gKG0HjOnXJnte1Yp8MzKN9hvuUS0 3LkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=8Zi9gDcpgvkQ+f+A6rpjVIJnHZS9bBhaqFj/Zs5i0eQ=; b=IE4Zih49kIky+ZQDFSbq233HggDjHtcL7m+cjx4EXb8Jz9ZY/+qGjbix932e8Kyjho kmMRI75vlOPdsg7AnwsDIuZ1ZwluWcgcRtkOH3B+FmZ7ILKLLQQKHdUTe3pVEoD8bgKG s237auWuHpqULkcq/ELvcMxHilYQ4Arh+z7Mlo+cs0cXnnKRKimGIdnII4qKRUbvF8zi FNglUIvk3kSdgfvah6UYqlqmCkiqKcZ/iblnSwWUv7zjN7vQ4hqCCUX87cJGKge7KdBf fKk0jUKT9EVJuWsnCvkgVI2ZdzbvxumbyViPKh53prKMSY5Rkc0vfdddN1NF+kSDcQpP lb6g== X-Gm-Message-State: AHQUAuak9Vhp6+xZX4YjJPmhW1e1ORnOgczoxIPZXe6Smryd9OfS2k6H SHI5dZ+O880So3QDwv0NR0twSumMs+f+Rwo8chavCAWT X-Google-Smtp-Source: AHgI3IZQWvPPr65MhP3Hb9TvwSEjIB6gkH6nhszKGVGakmhmiVHU9DypdTWLndVwIy/ndgAJM2GWNNGRh0fu9lOX2XI= X-Received: by 2002:a1c:1fc8:: with SMTP id f191mr137673wmf.110.1551120161625; Mon, 25 Feb 2019 10:42:41 -0800 (PST) MIME-Version: 1.0 From: Abdo Haji-Ali Date: Mon, 25 Feb 2019 18:42:05 +0000 Message-ID: Content-Type: text/plain; charset="UTF-8" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::333 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: 1.0 (+) X-Mailman-Approved-At: Mon, 25 Feb 2019 15:39:32 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 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 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? From unknown Tue Jun 17 01:43:23 2025 X-Loop: help-debbugs@gnu.org Subject: bug#34654: Attaching a file with a new name in a message Resent-From: Federico Tedin Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 31 Mar 2019 01:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34654 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Abdo Haji-Ali Cc: 34654@debbugs.gnu.org Received: via spool by 34654-submit@debbugs.gnu.org id=B34654.15539954364746 (code B ref 34654); Sun, 31 Mar 2019 01:24:02 +0000 Received: (at 34654) by debbugs.gnu.org; 31 Mar 2019 01:23:56 +0000 Received: from localhost ([127.0.0.1]:37694 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hAPCW-0001EU-7x for submit@debbugs.gnu.org; Sat, 30 Mar 2019 21:23:56 -0400 Received: from mail-qt1-f174.google.com ([209.85.160.174]:37802) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hAPCU-0001EF-JI for 34654@debbugs.gnu.org; Sat, 30 Mar 2019 21:23:55 -0400 Received: by mail-qt1-f174.google.com with SMTP id z16so6966811qtn.4 for <34654@debbugs.gnu.org>; Sat, 30 Mar 2019 18:23:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=lmWWVgaUe4mvNY3RvmRhKio0wMDluSMeEKVdfwOBBLc=; b=ar/B6yZB//UZDO0rcSXvwb4uTnZnDdQbadag7S4g+rZ2LiNRHGwXJVrx8pOphpsvOU X60dsi4d4MNCAPMCCZJaXlxs/Ed+NHqq3P9ezY7P+zN4PCpC7Nb0Ux8xxCh16obmJkAk AQY+JD5SbSA0KscaG0cATi7E+y6amPM7Lbojz4INhYPVgtLkaDiusgV98EF2hvhRXT3V 6vIkumyPgPIOi/31l7OHaywGKOIVLUdfu1o7OeKx4z3wnspGIV1bKPtQppmFt40kWX88 f1R03/JWvqdGx/9fjlOJtllN+R7InbbHUlLvyMh2njP7iJxHmCwowW+sdp67v7XB27Tv lI6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=lmWWVgaUe4mvNY3RvmRhKio0wMDluSMeEKVdfwOBBLc=; b=b62DNqeQKWVtzxYBLip2HYnkbDbPx9dsuYFzFPqMnYuSu/DCb7SulS5o4ESpTBbDWA vz3Lp1PF5F+8AbsRNa6wt6I7mfWoIYrmIqAvbQ1nUNpJCza/epl3yxjGsLPTF2gd7eL5 1aipaM7Ks+WDll2FF4bwV/PGbw0pPoMa2eO8MvJX/SS926oXMOo1Hk8E5duG1yiDSyU5 FhjxHap9A9mThve1pqDKvJyS1P53xxpwf+Ev2lx3By9IchW1BeFRDfPr75qTF8OdX6vs yz8DCP3Gi0qLMa19TTJajLyAJTz1HRArqqcLDBQclpSHWCMBQNuSCir5VZ5ngNfGY+On 3h3A== X-Gm-Message-State: APjAAAVakC1MBDiV6WjL+C+vq/zriDyIOVYxTPnTav3yHQWUwpVNETsT YE4dVoOvPdf4OwTPtucB4zK+/McL X-Google-Smtp-Source: APXvYqws7qrLaDevtO81JyuPPe0DiAPey5oAOs+YW4zkDJUSfLzZLDUp9DeW4Bw9ge3qvpUH7QIf7Q== X-Received: by 2002:a0c:ba0f:: with SMTP id w15mr11621053qvf.20.1553995428915; Sat, 30 Mar 2019 18:23:48 -0700 (PDT) Received: from lead ([186.141.133.170]) by smtp.gmail.com with ESMTPSA id h22sm4758557qth.68.2019.03.30.18.23.47 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 30 Mar 2019 18:23:48 -0700 (PDT) From: Federico Tedin References: Date: Sat, 30 Mar 2019 22:23:45 -0300 In-Reply-To: (Abdo Haji-Ali's message of "Mon, 25 Feb 2019 18:42:05 +0000") Message-ID: <87ftr3j0pq.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Abdo Haji-Ali 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 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"? From unknown Tue Jun 17 01:43:23 2025 X-Loop: help-debbugs@gnu.org Subject: bug#34654: Attaching a file with a new name in a message Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 13 May 2019 20:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34654 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Abdo Haji-Ali Cc: 34654@debbugs.gnu.org Received: via spool by 34654-submit@debbugs.gnu.org id=B34654.15577783947186 (code B ref 34654); Mon, 13 May 2019 20:14:01 +0000 Received: (at 34654) by debbugs.gnu.org; 13 May 2019 20:13:14 +0000 Received: from localhost ([127.0.0.1]:46381 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hQHJx-0001rq-OL for submit@debbugs.gnu.org; Mon, 13 May 2019 16:13:13 -0400 Received: from quimby.gnus.org ([80.91.231.51]:45470) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hQHJu-0001rg-9N for 34654@debbugs.gnu.org; Mon, 13 May 2019 16:13:10 -0400 Received: from [12.41.144.226] (helo=sandy) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hQHJr-0001Gl-9d; Mon, 13 May 2019 22:13:09 +0200 From: Lars Ingebrigtsen References: Date: Mon, 13 May 2019 16:13:05 -0400 In-Reply-To: (Abdo Haji-Ali's message of "Mon, 25 Feb 2019 18:42:05 +0000") Message-ID: <87tvdyru3y.fsf@mouse.gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Abdo Haji-Ali writes: > 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 > s [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Abdo Haji-Ali writes: > 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? It looks like the documented recipient-filename functionality was never actually implemented? I grepped through the sources for "recipient-filename" and found nothing. Weird. Anyway, I've now added the functionality to Emacs 27.1. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Mon May 13 16:13:35 2019 Received: (at control) by debbugs.gnu.org; 13 May 2019 20:13:35 +0000 Received: from localhost ([127.0.0.1]:46384 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hQHKJ-0001sU-0Z for submit@debbugs.gnu.org; Mon, 13 May 2019 16:13:35 -0400 Received: from quimby.gnus.org ([80.91.231.51]:45484) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hQHKG-0001sL-Or for control@debbugs.gnu.org; Mon, 13 May 2019 16:13:33 -0400 Received: from [12.41.144.226] (helo=sandy) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hQHKE-0001Gt-0Q for control@debbugs.gnu.org; Mon, 13 May 2019 22:13:32 +0200 Date: Mon, 13 May 2019 16:13:27 -0400 Message-Id: <87sgtiru3c.fsf@mouse.gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #34654 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 34654 fixed close 34654 27.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 34654 fixed close 34654 27.1 quit