From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Welsh Duggan Newsgroups: gmane.emacs.devel,gmane.emacs.gnus.general Subject: Re: smtp crap Date: Sat, 08 Oct 2011 21:28:41 -0400 Message-ID: <8762jz6jhy.fsf@maru.md5i.com> References: <8739f4kzp3.fsf@catnip.gol.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1318123742 26094 80.91.229.12 (9 Oct 2011 01:29:02 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 9 Oct 2011 01:29:02 +0000 (UTC) Cc: ding@gnus.org, emacs-devel@gnu.org To: Miles Bader Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 09 03:28:58 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RCiCE-0000oD-In for ged-emacs-devel@m.gmane.org; Sun, 09 Oct 2011 03:28:54 +0200 Original-Received: from localhost ([::1]:54158 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RCiC9-0005VS-3W for ged-emacs-devel@m.gmane.org; Sat, 08 Oct 2011 21:28:49 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:55642) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RCiC6-0005VB-9L for emacs-devel@gnu.org; Sat, 08 Oct 2011 21:28:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RCiC5-0003xs-5r for emacs-devel@gnu.org; Sat, 08 Oct 2011 21:28:46 -0400 Original-Received: from md5i.com ([75.151.244.229]:49378 helo=maru.md5i.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RCiC3-0003xd-Kf; Sat, 08 Oct 2011 21:28:43 -0400 Original-Received: from md5i by maru.md5i.com with local (Exim 4.76) (envelope-from ) id 1RCiC2-0003Rn-9T; Sat, 08 Oct 2011 21:28:42 -0400 In-Reply-To: <8739f4kzp3.fsf@catnip.gol.com> (Miles Bader's message of "Sat, 08 Oct 2011 11:02:48 +0900") User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 75.151.244.229 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:144774 gmane.emacs.gnus.general:80249 Archived-At: Miles Bader writes: > Why does emacs _keep_ asking me if I want to "Set up Emacs for sending > SMTP mail"?! > > My computer has a MTA, it works; if Emacs tries to send smtp directly, > it very possibly _won't_ work[*]. So this question isn't just > annoying, it's harmful. > > I kept answer "n" to this question, but just now I accidentally > answered "y" -- and now only did that one piece of mail end up in the > bit-bucket, but emacs now seems to be in a state where it thinks I > want to use smtp -- it keeps asking me for an smtp server -- even > though I've changed the variable (`send-mail-function') back to what I > guess it should be (`sendmail-send-it'). I recently solved this problem for myself. I was seeing the same behavior. The problem was this: sending mail called the function stored in message-send-mail-function. This variable is initialized in message.el from send-mail-function, which defaults to sendmail-query-once. Once I answered "n" to the query, it changed send-mail-function for sendmail-send-it via customize. Unfortunately, I use a separate custom file by setting custom-file in my .emacs.el. At the end of my .emacs.el, I load the file with (load custom-file). What happens here is that send-mail-function is set to sendmail-query-once, then my .emacs.el is read. In my .emacs.el, I have a (require 'message), which then initializes message-send-mail-function to sendmail-query-once. Then my .emacs.el loads my custom file, which sets send-mail-function to sendmail-send-it. Then, when I send mail, it calls sendmail-query-once, as this is what message-send-mail-function is set to. I fixed this by loading my custom file before requiring message.el. Your problem may be different, but if not, this experience of mine might help. -- Michael Welsh Duggan (md5i@md5i.com)