From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 11 22:26:15 2025 Received: (at submit) by debbugs.gnu.org; 12 Jul 2025 02:26:15 +0000 Received: from localhost ([127.0.0.1]:42029 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uaPwM-00054O-0l for submit@debbugs.gnu.org; Fri, 11 Jul 2025 22:26:15 -0400 Received: from lists.gnu.org ([2001:470:142::17]:38558) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <8dcc.lists@gmail.com>) id 1uaG9N-0006jY-F9 for submit@debbugs.gnu.org; Fri, 11 Jul 2025 11:59:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <8dcc.lists@gmail.com>) id 1uaG9E-0004P0-Mg for bug-gnu-emacs@gnu.org; Fri, 11 Jul 2025 11:58:54 -0400 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <8dcc.lists@gmail.com>) id 1uaG9D-0002lu-63 for bug-gnu-emacs@gnu.org; Fri, 11 Jul 2025 11:58:52 -0400 Received: by mail-wm1-x342.google.com with SMTP id 5b1f17b1804b1-4538bc52a8dso16327865e9.2 for ; Fri, 11 Jul 2025 08:58:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1752249529; x=1752854329; darn=gnu.org; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=aEf7rsQNn4sDc1jumwWmWX8aq9utqXvrlFX/GYUBqjI=; b=k/2ZdNbnIkWd3kOJYeoX2LzUSe99bxnz+9h+YoVRI8mZL7aHARQZvsnN0MscTi3YFW BdlC1aHkiz/Oc24DYQA05RtPnp/UfOwXnpemoNSrhpvXeWfsACL+BSQZTWxhzSOvwC9F mbemqLOohqaKdGp2ewb+3Uq0eV0OPYznOZe7Uh8efliBNXycFPJcMlrEvhT82Y4hNt5S zdBXL49u43QkZFQhKQDI8TfY6UcDNCtGAF9aQbUXeMH5Ssu139QLRIswZr3Raj67zMMk MDeuS4vjVYTWEiV7mrRs0yOG1bPp+fHyTlviRNPn8bnUh8PGFdAOYn0gDTeHWF8EYHjg GTCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1752249529; x=1752854329; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=aEf7rsQNn4sDc1jumwWmWX8aq9utqXvrlFX/GYUBqjI=; b=an+0clIe7f2xHXaehxL0JYlyzxS741gtlH97UpfzWe8HlY16c0yaTg+Jt7xa3lCJj5 1LIVzGv/ZCF1er9zqA7MYM8nss9HELocPzgY6Ko4wE7NkEH13v3orqa/BU+FhXc7LWPQ 8+GRbZ5OTem2xtdMAmkMLMKWEJsefFdAM/AOEHGFTxEWBG5zVCP8fwaxip0VPqYIN0VJ Elmhsaift4Jn7PsICwgZGxhq30iE/+TmSqn/uqBudlGvup808FG406mXMh/6Jh60abf5 q0YpnAJJ3ffKyZ9MHI+08BroPNQc7pm87noQf1bX2UcmC+NtuWXAL8gRwq2eXIctcz6z 4U6A== X-Gm-Message-State: AOJu0YwZvBBuZGp0OHKnM2okcCxRyavSxDwLIACZvlAPT/NFuNybtJE2 emuM5R28tpWI3F1Cs4aJDAmcuAS5jtBoQJ8wFooX+RIX3wWyJVFdUXm1Wos7cGO2 X-Gm-Gg: ASbGnctDyjmW8CH62KIt8QFqakznGsjPBCWm8hcXa/Pk1vXsobzTUPR5BCbiL1oq9rq TN/r5tBQPk6MeupEm0MvskOdP+O+NH+mKdHRNwcxnPnC9iHbq+nKIvPsprKH5dFwyDNl6pZGqye 6Qfi4bsIxTW/d5/f7d+KLeKKxFlUAutYHg696NhzwIFH70RXZRSHkuelajcJzDc1GHQwsg1T8nQ sR9aAU2CkcbhCmy1RrdR76KmF488H2By9F8BEHmhDLcXy4cmB8ImaqBQFm3gBkSh0Iy3/P6XVzA 3ka5XvxcVcytpsSFraVOcLSj1TQxy8GFgMZhVzdRqH2BWDeSyl5RfdL/yKfEBI5Wr7RYqvbU4H0 965QOkTj7SqAUVts= X-Google-Smtp-Source: AGHT+IHKIZud333D9LZfr2jsBqZD+1NjUlBXFPA5OFUzLFMPGhCLXueSem+kUYis3Cd3Z38EUOC7vA== X-Received: by 2002:a05:6000:240e:b0:3a4:e5ea:1ac0 with SMTP id ffacd0b85a97d-3b5f187a4a8mr4169332f8f.5.1752249529063; Fri, 11 Jul 2025 08:58:49 -0700 (PDT) Received: from computer ([91.126.43.226]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3b5e8e0d88dsm4883075f8f.65.2025.07.11.08.58.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Jul 2025 08:58:48 -0700 (PDT) From: 8dcc <8dcc.lists@gmail.com> X-Google-Original-From: 8dcc <8dcc.git@gmail.com> To: bug-gnu-emacs@gnu.org Subject: 29.4; Invalid authinfo credentials when sending mail through SMTP Date: Fri, 11 Jul 2025 17:58:47 +0200 Message-ID: <87cya67m88.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::342; envelope-from=8dcc.lists@gmail.com; helo=mail-wm1-x342.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, FREEMAIL_REPLY=1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.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 the administrator of that system for details. Content preview: Hello, I have been trying to write a simple Emacs Lisp function that lets me select the credentials that are used when sending mail through `compose-mail' with `message-send-mail-function' set to `smtpmail-s [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2001:470:142:0:0:0:0:17 listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (8dcc.lists[at]gmail.com) -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 1.0 FREEMAIL_REPLY From and body contain different freemails X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Fri, 11 Jul 2025 22:26:12 -0400 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 have been trying to write a simple Emacs Lisp function that lets me select the credentials that are used when sending mail through `compose-mail' with `message-send-mail-function' set to `smtpmail-send-it'. I tried many things, including modifying the "From:" field, and changing `user-mail-address' (both locally and globally). Although the "From" header does indeed change to the right value when sending the email, the credentials used when authenticating with the SMTP server don't change; in the case of Gmail, this "From" header gets overwritten and a new "X-Google-Original-From" header is added. I thought that the email that was used for authentication was the one I had originally set as `user-mail-address', but it turns out that it entirely depends on the order of the entries in my '~/authinfo.gpg' file. For example, if the contents of the file were: machine 127.0.0.1 login my-user port ssh password "****" machine smtp.gmail.com login foo@gmail.com password "****" port 465 machine smtp.gmail.com login bar@gmail.com password "****" port 465 Then the credentials of "foo@gmail.com" would be used, since it's the first line whose "machine" value matches the value of my `smtpmail-smtp-server' variable. Please let me know if you need any more information. Thank you, 8dcc. From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 19 04:08:08 2025 Received: (at 78996) by debbugs.gnu.org; 19 Jul 2025 08:08:08 +0000 Received: from localhost ([127.0.0.1]:39475 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ud2c2-0002Sf-Ry for submit@debbugs.gnu.org; Sat, 19 Jul 2025 04:08:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58772) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ud2c0-0002RR-LX for 78996@debbugs.gnu.org; Sat, 19 Jul 2025 04:08:05 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ud2bv-00024w-02; Sat, 19 Jul 2025 04:07:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=ExZfg4QZWfx7NX9cuSAHvaV5gSZTbfyn9J/5euyo+v4=; b=NUYULhEXhtQI 8MEt3q0YiZNzIqseVe+0uneItUPoSW82KkGH5FfenVCwPlnR9XkDaru69fjG/YQ3AJ3TGPe+A7ZKQ JpkPhy0Xu8Mv9DhHot0Ni5oXL8sVTr9xYul8Umvf49lNR39RhlBucpn8QYJgetNHSyb0LbcWQXy1X yNZsvoP2U6HsBit0Nimo2vK0Bq1V0y+kOXumLTpI8a6w4zNQoJ/vP4OWxNtIn++NBoV5pUTS7nAj9 S1y6XtTeGMAOTiv71/FWl86fcOjdLuBnXTZE0CNlYp92Ijtxh+6XB1bfkuY09qvLZ8+pxEzfqkVs6 /wuW6iQkRMY2wZADjmJnJQ==; Date: Sat, 19 Jul 2025 11:07:57 +0300 Message-Id: <86ldokeh7m.fsf@gnu.org> From: Eli Zaretskii To: 8dcc <8dcc.lists@gmail.com> In-Reply-To: <87cya67m88.fsf@gmail.com> (message from 8dcc on Fri, 11 Jul 2025 17:58:47 +0200) Subject: Re: bug#78996: 29.4; Invalid authinfo credentials when sending mail through SMTP References: <87cya67m88.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 78996 Cc: 78996@debbugs.gnu.org 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: -3.3 (---) > From: 8dcc <8dcc.lists@gmail.com> > Date: Fri, 11 Jul 2025 17:58:47 +0200 > > I have been trying to write a simple Emacs Lisp function that lets me > select the credentials that are used when sending mail through > `compose-mail' with `message-send-mail-function' set to > `smtpmail-send-it'. I tried many things, including modifying the "From:" > field, and changing `user-mail-address' (both locally and > globally). Although the "From" header does indeed change to the right > value when sending the email, the credentials used when authenticating > with the SMTP server don't change; in the case of Gmail, this "From" > header gets overwritten and a new "X-Google-Original-From" header is > added. > > I thought that the email that was used for authentication was the one I > had originally set as `user-mail-address', but it turns out that it > entirely depends on the order of the entries in my '~/authinfo.gpg' > file. > > For example, if the contents of the file were: > > machine 127.0.0.1 login my-user port ssh password "****" > machine smtp.gmail.com login foo@gmail.com password "****" port 465 > machine smtp.gmail.com login bar@gmail.com password "****" port 465 > > Then the credentials of "foo@gmail.com" would be used, since it's the > first line whose "machine" value matches the value of my > `smtpmail-smtp-server' variable. > > Please let me know if you need any more information. My reading of smtpmail.el is that you should set the value of smtpmail-smtp-user to control the selection of credentials by login name. Did you try that? From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 19 10:25:38 2025 Received: (at 78996) by debbugs.gnu.org; 19 Jul 2025 14:25:38 +0000 Received: from localhost ([127.0.0.1]:43206 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ud8VL-0003yp-W2 for submit@debbugs.gnu.org; Sat, 19 Jul 2025 10:25:36 -0400 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:55596) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <8dcc.lists@gmail.com>) id 1ud8VA-0003uV-Sw for 78996@debbugs.gnu.org; Sat, 19 Jul 2025 10:25:31 -0400 Received: by mail-wr1-x441.google.com with SMTP id ffacd0b85a97d-3a531fcaa05so1326346f8f.3 for <78996@debbugs.gnu.org>; Sat, 19 Jul 2025 07:25:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1752935118; x=1753539918; darn=debbugs.gnu.org; h=mime-version:message-id:date:in-reply-to:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=rDnuBF+tL9tbp97ZqJtE6Gx9VTNTxQE1epDb9HihQ2U=; b=FCQ6aEjftd+CpX28PS/s/Ky1zhhd4e16Ti5lJM7ppUB/TcYDn6MPTQ/WaovWi+zGi9 0wdH3f7mJX9VU0PWdhJUNExrhZxV0iV8SqmRgYc8Op+zwFgkxZP2AdhAh1CQ4I1/Ztqt lRUa7NWQjxrMN6GI5wWoQ2eiPZQDGOdjOWXpo6G5chtB7kmCaZYVhz+YHZ+MUNEFxYU/ Dt3LgPZKbnxAwHyM6igLtpA6ZHswKMtVVGu7rd1V+ZBsg0OxY+WsMW2pCFsWxbHSHYLb Ifp4lBGAzDPxBtlBqxo4OSoS/meLURMMLy8ojhMBy7eaPC/5JB+mABSz777nnbr0gx1+ UW0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1752935118; x=1753539918; h=mime-version:message-id:date:in-reply-to:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=rDnuBF+tL9tbp97ZqJtE6Gx9VTNTxQE1epDb9HihQ2U=; b=tKrPZYIUgai0GkWZJ/G5lXba6uMyaH6mKS/+WWpaFXfDaoYXNgJAthOWrMVFq2QATH sbA2bXUHENfx+/8GzYSc/7/FTWqjyNl98Ca6G0YoxhBoAUt7YVTIaVWnaV0xzmDyxozv p/nQPJzGec5gI9JQWYwc2E9Vygppt7JMZdYVTKeu4ynd6n6GcWTwXXp82jhn8deOuBWL Mx1Yu+gQXJeFfkUJJaLommBgTPIiXVLmYButBdQyOiRGfkjarOF67nr5Yw21vfk2JHKj Vl4H6XKUfvhLxhFpt0LGPCUl5KMk2V06AuAhmPM++Y1LRqG7pJWkwigrM9IeUmGTWFmh XILQ== X-Gm-Message-State: AOJu0YwHQ3qE8uwdaQ7IjQ4xbkWD4SXlHoo+ySY4EBPOniAatKRVb9Ef 2c3P/19xLdDkpfFGV1nza6cCZ6ffHxP3yaquE85oxbM41tV/sjp0q/U7DFmpilTg X-Gm-Gg: ASbGnctD1hNWSNZQmhCzwj4+pjFziAkJgIYDDmWBTdF2NC/AJo9Zfgm6Q7CLioUGdOW Pd4rG+1e74fJst5iFmfFBnMeCba1VIeqfZcW0fkIYODTmsRY+rtwle1L0Gs2BxNy9Nv+8lQfdDf rVGwZ9AdS8nU+d29JDpsI1wxIynxrakB8ons2vNicMk1exDmoaJtdg9FNkNMeL+aULqVmvb9F5a CLoL+tpBhR5iTQRt8cwEMNrK7A8QG02AalaXgKWum1hzQHfuc+vBBXSYCqy1U+64uarxq6YjLMw vED69N2ZdBMiU1WKA0CxjL7BgOemJWM+qE9Qf7mS906ssTRX9tuWnNMBF7tNxA9dE1GPjM6UpCD PxxTB8UHByD2tclOkrw== X-Google-Smtp-Source: AGHT+IEv7KOACxft061oPMhUzOTX0/h1Y9Bf4dPF2wS7FzyBDBxatPbIjFIBuoEPNU8ldw576X58gA== X-Received: by 2002:a5d:5e8a:0:b0:3a8:38b4:1d55 with SMTP id ffacd0b85a97d-3b60e513793mr11334054f8f.28.1752935118176; Sat, 19 Jul 2025 07:25:18 -0700 (PDT) Received: from computer ([91.126.43.226]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4563b740c51sm48528705e9.19.2025.07.19.07.25.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Jul 2025 07:25:17 -0700 (PDT) From: 8dcc <8dcc.lists@gmail.com> To: Eli Zaretskii Subject: Re: bug#78996: 29.4; Invalid authinfo credentials when sending mail through SMTP In-Reply-To: <86ldokeh7m.fsf@gnu.org> (message from Eli Zaretskii on Sat, 19 Jul 2025 11:07:57 +0300) Date: Sat, 19 Jul 2025 16:25:09 +0200 Message-ID: <87ldok5kca.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 78996 Cc: 78996@debbugs.gnu.org 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 (-) > My reading of smtpmail.el is that you should set the value of > smtpmail-smtp-user to control the selection of credentials by login > name. Did you try that? I have just tried that, and it only seems to work if I set it globally. Specifically, I added the following hook: (add-hook 'message-send-hook (lambda () (let ((from (mail-fetch-field "from"))) (when from (let* ((components (mail-extract-address-components from)) (name (car components)) (addr (cadr components))) (when name (setq-local user-full-name name)) (when addr (setq-local user-mail-address addr smtpmail-smtp-user addr))))))) If I modify the "From" address in the `message-mode' buffer, it does in fact locally change `smtpmail-smtp-user' to the correct value (bar@gmail.com). I have an entry in my '~/.authinfo.gpg' with that address after the "login" keyword, but it still authenticates with the first entry. If I manually evaluate: (setq smtpmail-smtp-user "bar@gmail.com") It does work fine. Is this by design? Why doesn't it work if I use `setq-local'? Thank you. From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 19 11:05:35 2025 Received: (at 78996) by debbugs.gnu.org; 19 Jul 2025 15:05:35 +0000 Received: from localhost ([127.0.0.1]:43403 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ud983-00075j-2M for submit@debbugs.gnu.org; Sat, 19 Jul 2025 11:05:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47850) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ud97u-00074d-62 for 78996@debbugs.gnu.org; Sat, 19 Jul 2025 11:05:31 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ud97o-0003g5-E7; Sat, 19 Jul 2025 11:05:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=5m5uLnhflXfL7E6gHalCtAFjHDnxXiA4Cvpol9btwkU=; b=njYevHucZqG0 3c7B45/SSe4h52u8yul4b1ZGJDrvcF0/7CrOnSRNi1x6JIpHQ2cjvd8T+JcGVpncDAO+vmYeKaOS8 xIQ1DM/c7iVaCaXIGSCz9B24Ww/5v4qlrxK9V51f8GdUvUTwXMLGcn6lm1gH70s99bB/HDVIQzD0J +qDlg/GJvXVVkIYs+0Sq4sbqD2Voc6VpEbu1fF6o30XCtszcRNGDjdtYfo4w+yCQzCGZ7/A0LyL6v bhAuR8p0LRD93CP53RxncBHjwHQ29Zffab3be2uNbBAKoo/GdcPprzFhjnPDHO5hru/+qvgppYQ/a jTcbOB8iWvwoHIdsIE9TAw==; Date: Sat, 19 Jul 2025 18:05:18 +0300 Message-Id: <86zfd0cjbl.fsf@gnu.org> From: Eli Zaretskii To: 8dcc <8dcc.lists@gmail.com> In-Reply-To: <87ldok5kca.fsf@gmail.com> (message from 8dcc on Sat, 19 Jul 2025 16:25:09 +0200) Subject: Re: bug#78996: 29.4; Invalid authinfo credentials when sending mail through SMTP References: <87ldok5kca.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 78996 Cc: 78996@debbugs.gnu.org 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: -3.3 (---) > From: 8dcc <8dcc.lists@gmail.com> > Cc: 78996@debbugs.gnu.org > Date: Sat, 19 Jul 2025 16:25:09 +0200 > > > My reading of smtpmail.el is that you should set the value of > > smtpmail-smtp-user to control the selection of credentials by login > > name. Did you try that? > > I have just tried that, and it only seems to work if I set it > globally. Specifically, I added the following hook: > > (add-hook > 'message-send-hook > (lambda () > (let ((from (mail-fetch-field "from"))) > (when from > (let* ((components (mail-extract-address-components from)) > (name (car components)) > (addr (cadr components))) > (when name > (setq-local user-full-name name)) > (when addr > (setq-local user-mail-address addr > smtpmail-smtp-user addr))))))) > > If I modify the "From" address in the `message-mode' buffer, it does in > fact locally change `smtpmail-smtp-user' to the correct value > (bar@gmail.com). I have an entry in my '~/.authinfo.gpg' with that > address after the "login" keyword, but it still authenticates with the > first entry. > > If I manually evaluate: > > (setq smtpmail-smtp-user "bar@gmail.com") > > It does work fine. Is this by design? Why doesn't it work if I use > `setq-local'? Probably because smtpmail uses a different buffer for accessing the authinfo? (That's a guess.) But I don't understand why you cannot set the value globally. It isn't like you need to send mail using several different credentials at the same time, is it? From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 20 00:35:07 2025 Received: (at 78996) by debbugs.gnu.org; 20 Jul 2025 04:35:07 +0000 Received: from localhost ([127.0.0.1]:47398 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1udLlS-0001sY-SC for submit@debbugs.gnu.org; Sun, 20 Jul 2025 00:35:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56756) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1udLlO-0001pe-Nr for 78996@debbugs.gnu.org; Sun, 20 Jul 2025 00:35:04 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1udLlJ-0002Ig-9d; Sun, 20 Jul 2025 00:34:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=TfzzgUo3ElfdiSoMZn7UB+HiUzXcVxL7W3AAWeGG0RI=; b=OHOvAfvhylJT paGirlD6xkyVZ28SbR9GkkZSGsQokjqYoB7/3wNSK63FFbkXFZ6rPT+LBias8uwcGYk3wnZXX5IYa UIgtr7uL1Zt8Tbw9mcfJYXpHr6FGUoPuoRf4LRF6+sTStwR2P5FsCNcgLFOjNj2XvkIN3cQK+aoWS pUkIcBxf1wUZEIqLPHDptjNOOb5bRI+PKKmn9L9Im73YCh+y4Rm/bRLWK7LdxR5mGOVWrVWyrzeCO V2LsoZy4DV+ntsUErQtR0fpsYqNyl30KAQ3aA0SYV1TaXUyhG1pe9e3E51HQkSDEWhZIFNXQKSa6B yNzE/+fkokcD/YvT6nkXtA==; Date: Sun, 20 Jul 2025 07:34:53 +0300 Message-Id: <86wm83cweq.fsf@gnu.org> From: Eli Zaretskii To: 8dcc <8dcc.git@gmail.com> In-Reply-To: <87tt37g7hu.fsf@gmail.com> (message from 8dcc on Sun, 20 Jul 2025 00:07:09 +0200) Subject: Re: bug#78996: 29.4; Invalid authinfo credentials when sending mail through SMTP References: <87tt37g7hu.fsf@gmail.com> X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 78996 Cc: 78996@debbugs.gnu.org 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: -3.3 (---) > From: 8dcc <8dcc.git@gmail.com> > Cc: 8dcc.lists@gmail.com, 78996@debbugs.gnu.org > Date: Sun, 20 Jul 2025 00:07:09 +0200 > > > But I don't understand why you cannot set the value globally. It > > isn't like you need to send mail using several different credentials > > at the same time, is it? > > I understand what you mean, but permanently modifying a global variable > because I want to send a specific mail from a specific buffer doesn't > seem right to me. For example, some other mode that uses SMTP could ends > up accessing that same value, and since it's not hooked, it could end up > using the email address from that one mail that I sent an hour ago, > which is not my main one (i.e. what used to be the global value of > `smtpmail-smtp-user'). > > I could perhaps save the old value in my own variable, and then restore > it in another hook, but that's very hacky and doesn't feel right at all. You have message-send-hook and message-sent-hook to do this. I don't understand why this is hacky, since your original code was also in a hook. Anyway, I think this bug can be closed now? From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 20 06:50:24 2025 Received: (at 78996) by debbugs.gnu.org; 20 Jul 2025 10:50:24 +0000 Received: from localhost ([127.0.0.1]:49059 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1udRce-0003Yp-31 for submit@debbugs.gnu.org; Sun, 20 Jul 2025 06:50:24 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]:45430) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <8dcc.git@gmail.com>) id 1udFiB-00048x-8m for 78996@debbugs.gnu.org; Sat, 19 Jul 2025 18:07:20 -0400 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-455ecacfc32so14645405e9.3 for <78996@debbugs.gnu.org>; Sat, 19 Jul 2025 15:07:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1752962832; x=1753567632; darn=debbugs.gnu.org; h=mime-version:message-id:date:in-reply-to:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=h5teL06S1h7pT7KOHIyjKH+RLHISt+XW/GzwEy2gEUE=; b=Ig3++pQ30301pcwLBMsYh4KNLSpoET6kSaHS86zMk5rmIGU3IdTMi34RB3akp27F9G 49WjoPTUR+EfIu6sNn0KWkuwIbFzWqM5f3Qf+0oQNwwSSoCUUTmE9C292Px6F6xCSOzH v8xLRDIaEhqJiDD3zqIWS/VoyjR5OfVlkZegUdkSRu6sxpJ73JiQiFbjpWWbYuLbteOc HEMOqii3PIEgz53rFLaoKnFFh2jIwxqgkQj6OCoL7EJjD7298R1SRPfBM1yCLYoxiIro wYCbfxSgTk3KDsa4jY9FJ84DMTOC+EPpn/PBrNHRp/AqjY9WLd77r35EgOglOC7Amwa3 cjzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1752962832; x=1753567632; h=mime-version:message-id:date:in-reply-to:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=h5teL06S1h7pT7KOHIyjKH+RLHISt+XW/GzwEy2gEUE=; b=e9h4qZ2dif0kGOIfTM6Bw9wAXPahOLpUgXMu+unPCALSkRK5dOtx5pZpDbIbmcQYsX 1hQPGnZF8EiN6PzJUDjjqmD6FwFDfEBv8idx19l4BcA8JIEbMmqn2lqjMl0Nntv/nIgW WVCe/TvRi2QdjALfCrRq6ctAcgn8CrzQO1IHRfpwbispBEq/nYwLW0w2mOWwRQQWZxHI 5IAaP0XBYLVrpKXZhfYyeMhTOt3Zi7BmmTU+tDC0VZpndepvVRYt9ab1/3iyqg+pYm+J eRuKN2JR60w4HaxuE9EZV6QS28oMG5M5tQQLaRb1P0rSBEjZ9+3D412AbBJ0p+4NWtX4 U8zA== X-Forwarded-Encrypted: i=1; AJvYcCXrClWoc6i9ID2YOhmQb7uefavToW4aSi8yU9ZwqaxXwkI0sgkXP8gR5XI0eDkBqdA+pehDxg==@debbugs.gnu.org X-Gm-Message-State: AOJu0YwvsvJspewkHLrLBAy7QYmu0n5qJVyNVtkpjvpgbJ7bYizs+wdi p0/y0elZjapAUOW1pcH/wIgs19yWrOGhnG4tgCnntggxC94fNUjgjBcwS6mK/Pe3 X-Gm-Gg: ASbGncsqLohZc54mqvHhGdjL3c2tGv6HSr0As0CoOCJDu03bMomYfVVcLEsfdc3GunL akELrwqxstiYMNMAJXmCADYtlPsyOOeCm6x4iBTwH9TNw3ySyy5Vneof4ZRM9Naa1BCA8NyNXX8 +wGbKK0zCDhDygixR/4rr6oDNZFPlTl2gV1il4HAG5LggKUZxrWLRxmfvATg7zMeiYkAEzXS0ue Kizt6tk9vBWe3RsUZE7+9KvzC+ZiKcRE1GbzDfouRjgftG2Nl+j88nHb2chOXtl65JOOqufPR+H n7WHniWrTsbcnCoYjks2oXIkzyoRbsEpOOX/r/xRB25nkpbyHhNYejYtIH8OdNWocW3AJpOE/iX /OY98vHoJpNe65VA= X-Google-Smtp-Source: AGHT+IHzzMGV2WmRR8gkm/Lpa+qKeMQ27CLssLDFdNGMNFaRA3F/GgFpw9aHdzWwCDAz9bzxrbv9AQ== X-Received: by 2002:a05:600c:310d:b0:456:13b6:4b18 with SMTP id 5b1f17b1804b1-4562e2a59a6mr166916775e9.31.1752962832001; Sat, 19 Jul 2025 15:07:12 -0700 (PDT) Received: from computer ([91.126.43.226]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4562e8026e4sm113779695e9.11.2025.07.19.15.07.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Jul 2025 15:07:11 -0700 (PDT) From: 8dcc <8dcc.git@gmail.com> To: Eli Zaretskii Subject: Re: bug#78996: 29.4; Invalid authinfo credentials when sending mail through SMTP In-Reply-To: <86zfd0cjbl.fsf@gnu.org> (message from Eli Zaretskii on Sat, 19 Jul 2025 18:05:18 +0300) Date: Sun, 20 Jul 2025 00:07:09 +0200 Message-ID: <87tt37g7hu.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78996 X-Mailman-Approved-At: Sun, 20 Jul 2025 06:50:22 -0400 Cc: 78996@debbugs.gnu.org, 8dcc.lists@gmail.com 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 (-) > Probably because smtpmail uses a different buffer for accessing the > authinfo? (That's a guess.) It seems that `smtpmail-send-queued-mail' uses `with-temp-buffer' before reading `smtpmail-smtp-user'. Not sure if this is necessary, and if it could be improved. > But I don't understand why you cannot set the value globally. It > isn't like you need to send mail using several different credentials > at the same time, is it? I understand what you mean, but permanently modifying a global variable because I want to send a specific mail from a specific buffer doesn't seem right to me. For example, some other mode that uses SMTP could ends up accessing that same value, and since it's not hooked, it could end up using the email address from that one mail that I sent an hour ago, which is not my main one (i.e. what used to be the global value of `smtpmail-smtp-user'). I could perhaps save the old value in my own variable, and then restore it in another hook, but that's very hacky and doesn't feel right at all. From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 20 06:50:29 2025 Received: (at 78996) by debbugs.gnu.org; 20 Jul 2025 10:50:29 +0000 Received: from localhost ([127.0.0.1]:49067 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1udRcj-0003ZM-0c for submit@debbugs.gnu.org; Sun, 20 Jul 2025 06:50:29 -0400 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]:44355) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <8dcc.git@gmail.com>) id 1udRAz-0001Wy-JX for 78996@debbugs.gnu.org; Sun, 20 Jul 2025 06:21:51 -0400 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-451d41e1ad1so23940105e9.1 for <78996@debbugs.gnu.org>; Sun, 20 Jul 2025 03:21:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1753006903; x=1753611703; darn=debbugs.gnu.org; h=mime-version:message-id:date:in-reply-to:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=/WiBEHkZXGh94LHBNS1XrJh2SO03iWt2G/MgW9P91X0=; b=LTBCHsCSyU2vLTrfa2qFAXygQFOYvMor/f8A66dwkZTqk2RITigX/WxZrGhm58mBcA QCicwG/Fj4zeqF7kcffDe86pCsxIQWU8H/KECjQc/dGrFW1mOfBESBYvLE9VuDWsnO8A xMD1ZBiYKaLPF1Gdhqt1KdeqYgf5dYOyTnUaXsah3tZOyxOs4R93KE7+AL8kw0TEaQFS fdNMImHC6UrR1BOU6G+fxz/xEhPs+AyRm4V7rto1XWC1LeYCZO+/t5/uD6Epd18cK2T+ m9OAdWhzgbaRMowNeihHNXt9qH7uTiiyiCyB3AC/PUqG4FbzGC/0bf0lzyZ5zOZzw8Yz 7kuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753006903; x=1753611703; h=mime-version:message-id:date:in-reply-to:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=/WiBEHkZXGh94LHBNS1XrJh2SO03iWt2G/MgW9P91X0=; b=BATF6UIICXVTAa85rjG0z/rd95coazZRBpPvKhtjWUawQ3KYm8Sw5J6wUXrfiNW7th UODH9gDuuS+DEc12ZVSmyhq4hFDuBqxWbjFfPyYJje1buZushOuE3886dPMAVh5JPH5S +Ru2f7ZTcx94xCnO2kcNIySLxd60LTTZeVc1IhP6/2rpwqdmCPbX0gyma0NcxAZBZ/NP 7yk9gRWNJ3cZ554SfshFUFl5wV8KL6M1Enq/8Uq8gQvifpuoylydAPo53DZvc5jDDBYd vQ4Nq+D/1wHX0hAWgpvhMzQxVkLpx22AL/b5c5z+yNe1RMCr4M9DaG66IpSOZcRb2AHu NGSA== X-Gm-Message-State: AOJu0Yzpw7DIqJmo/wYgl4Iyj5FAiYRb32jvuv3OdSynOKj5i+/Ai2n1 9Pd1PDQOmB9VM9VeYml1KchhMBLHDyEF1J/OQ4CzWI/8SsGiCvm57DvVI/1BV0qo X-Gm-Gg: ASbGncuVwN8uKUi81CVFinUIeyM4s/vTNqFjRJvvl56pP7SrxlvUZaX0FiLyMNPqqVe 6BMjrYgH9beBCMOesTOPcw9nLtJG0tttY9ngaBU2YAqKivICTNt3nu8npeYqxjYV+lapz+RmT+R I/ZgwKlDSC7bxWtmMsraCS0qw40nZdPrTukx+LMQwIxHuOJOUvlLhTONMFGyMyohdEDkXJIq4Ci cbkgwJRRtDcngNjVhul48lLerePC/V/aMV9nyImZUH1Vg/TC3NFMevWi5mARJfqkdv8XnIQ2ek9 oUjsv7/IFdmOkGBuQPcQEJKiPzXKDFcl0fHY9NyTMtkp4K8hO0R6Y650wWDvS/yFCDlw8D5D8UO zkamGh3lxO+iAtAg= X-Google-Smtp-Source: AGHT+IHtvvjfsSF6MeEbtJY/HGE+Fp01cOydiNl8OidSi2d4bH+zcbtdBzhqQXFY1yNqQdal57NZYA== X-Received: by 2002:a05:600c:b86:b0:456:1560:7c5f with SMTP id 5b1f17b1804b1-4562e03e710mr177711635e9.14.1753006902728; Sun, 20 Jul 2025 03:21:42 -0700 (PDT) Received: from computer ([91.126.43.226]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4562e802afasm127787585e9.12.2025.07.20.03.21.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 20 Jul 2025 03:21:42 -0700 (PDT) From: 8dcc <8dcc.git@gmail.com> To: Eli Zaretskii Subject: Re: bug#78996: 29.4; Invalid authinfo credentials when sending mail through SMTP In-Reply-To: <86wm83cweq.fsf@gnu.org> (message from Eli Zaretskii on Sun, 20 Jul 2025 07:34:53 +0300) Date: Sun, 20 Jul 2025 12:21:40 +0200 Message-ID: <87h5z7cgcr.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78996 X-Mailman-Approved-At: Sun, 20 Jul 2025 06:50:22 -0400 Cc: 78996@debbugs.gnu.org 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 (-) > You have message-send-hook and message-sent-hook to do this. > > I don't understand why this is hacky, since your original code was > also in a hook. I think modifying a global variable permanently from within a hook is hacky, and I think saving it in a temporary variable across hooks is also a hacky work-around. That's just my opinion. > Anyway, I think this bug can be closed now? Yes. Thank you for your help! From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 20 07:50:00 2025 Received: (at 78996-done) by debbugs.gnu.org; 20 Jul 2025 11:50:00 +0000 Received: from localhost ([127.0.0.1]:49346 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1udSYK-00028w-4y for submit@debbugs.gnu.org; Sun, 20 Jul 2025 07:50:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33010) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1udSYH-00028H-Nm for 78996-done@debbugs.gnu.org; Sun, 20 Jul 2025 07:49:58 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1udSYC-0001rT-3c; Sun, 20 Jul 2025 07:49:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Mg1XZUWaHN0zycUVxQu41rp8LTL39Z0m6SfcBNmgYjw=; b=SsbQ+y33VGyY amgAoCBZGaIQXY++8XY2n7QY04GmJV1ARTTB6hj9pJGnNv8FoaURcdkxKJWi0kopLSFdpe0xnU8z8 +RETFJy/MQFmpCHjWhw3+nNy8yEO+JTn5ri5j6gAFKBymIUl48FUh0l+fn7dqomi/o9cki2uV/W9w hJe68ShCKVa42KIE8oG7ZX5Xi5t/Wy7XtWWth76NOmgBtw3n1nTOlXZLbN9GDFwUiGcxl1MQ+S5xr m88kSJHbO+LiYjwRjWc+ZbPcMD0zsuFro7ZuwO4h6JYPx1JPKKysyuTtBX+8GDFgcN5vwmdHYxVAZ craQq8OjJaMKiY2H3w1EeQ==; Date: Sun, 20 Jul 2025 14:49:48 +0300 Message-Id: <86pldvcc9v.fsf@gnu.org> From: Eli Zaretskii To: 8dcc <8dcc.git@gmail.com> In-Reply-To: <87h5z7cgcr.fsf@gmail.com> (message from 8dcc on Sun, 20 Jul 2025 12:21:40 +0200) Subject: Re: bug#78996: 29.4; Invalid authinfo credentials when sending mail through SMTP References: <87h5z7cgcr.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 78996-done Cc: 78996-done@debbugs.gnu.org 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: -3.3 (---) > From: 8dcc <8dcc.git@gmail.com> > Cc: 78996@debbugs.gnu.org > Date: Sun, 20 Jul 2025 12:21:40 +0200 > > > You have message-send-hook and message-sent-hook to do this. > > > > I don't understand why this is hacky, since your original code was > > also in a hook. > > I think modifying a global variable permanently from within a hook is > hacky, and I think saving it in a temporary variable across hooks is > also a hacky work-around. That's just my opinion. Understood. > > Anyway, I think this bug can be closed now? > > Yes. Thank you for your help! Thanks, done. From unknown Fri Sep 19 20:44:07 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 18 Aug 2025 11:24:08 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator