From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: torys.anderson@gmail.com (Tory S. Anderson) Newsgroups: gmane.emacs.help Subject: Re: Dynamically switching send-mail settings Date: Sun, 08 Feb 2015 21:54:12 -0500 Message-ID: <874mqvx0a3.fsf@gmail.com> References: <87d25khy5u.fsf@robertthorpeconsulting.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1423450476 4559 80.91.229.3 (9 Feb 2015 02:54:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 9 Feb 2015 02:54:36 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Robert Thorpe Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Feb 09 03:54:36 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YKeUc-000629-0M for geh-help-gnu-emacs@m.gmane.org; Mon, 09 Feb 2015 03:54:34 +0100 Original-Received: from localhost ([::1]:58575 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YKeUb-0002t6-Fc for geh-help-gnu-emacs@m.gmane.org; Sun, 08 Feb 2015 21:54:33 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38067) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YKeUJ-0002sz-T0 for help-gnu-emacs@gnu.org; Sun, 08 Feb 2015 21:54:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YKeUI-0004sj-Lr for help-gnu-emacs@gnu.org; Sun, 08 Feb 2015 21:54:15 -0500 Original-Received: from mail-yh0-x22e.google.com ([2607:f8b0:4002:c01::22e]:52971) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YKeUI-0004sY-Gx for help-gnu-emacs@gnu.org; Sun, 08 Feb 2015 21:54:14 -0500 Original-Received: by mail-yh0-f46.google.com with SMTP id z6so254456yhz.5 for ; Sun, 08 Feb 2015 18:54:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=+BL2qHsQ4NRIGcmQ2wYmNztqgBbhCi/G4z31IeY+VFs=; b=ZNFqyftEDm94xU2QLPUsrkCjVR2IPPr8dltav+jaYhT6xIYhgL5VFG1ruDlPLNbcAi PeaBjDewEW3eB9uyF/1iuNFn3AKpnh4gYRu4WazR0sktFwu7Vu0v4+I4tzLvwDqa5qYn ldC764s3RAd/NRomoXVv6us/XHnDDU2+0W4YcD4QHwTt4Qw0SvlmX4eMjuSpYBYVSpoa ka62cGweDsj6J2yved+sfdt91RDy5flInPq21eqv1g9AxSmwOxnMyJXopZDviFNSqf2A DoOrDNeRiS1Y4voqvKkbzK30eV1LzGTFKbXR85Uqo5tNf6qY//BtvrUjN1I4PQEEoUnG CoFA== X-Received: by 10.170.60.150 with SMTP id c144mr3615725ykc.54.1423450453519; Sun, 08 Feb 2015 18:54:13 -0800 (PST) Original-Received: from localhost.localdomain ([2601:0:a602:24aa:ee55:f9ff:feb5:5589]) by mx.google.com with ESMTPSA id j41sm6725725yhj.18.2015.02.08.18.54.12 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 08 Feb 2015 18:54:12 -0800 (PST) In-Reply-To: <87d25khy5u.fsf@robertthorpeconsulting.com> (Robert Thorpe's message of "Sun, 08 Feb 2015 21:49:01 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4002:c01::22e X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:102587 Archived-At: In this case it happens even if not a gmail account, and unfortunately a new day didn't fix it. Two questions: First, with this message: Opening TLS connection with `gnutls-cli --insecure -p 587 smtp.gmail2.com'...failed Opening TLS connection with `gnutls-cli --insecure -p 587 smtp.gmail2.com --protocols ssl3'...failed Opening TLS connection with `openssl s_client -connect smtp.gmail2.com:587 -no_ssl2 -ign_eof'...done Is it expected to cycle through different TLS methods? Second, could my change be occurring too late? Right now I have my function on a hook as follows: --8<---------------cut here---------------start------------->8--- (add-hook 'message-send-hook 'change-smtp) ;(add-hook 'message-send-mail-hook 'change-smtp) --8<---------------cut here---------------end--------------->8--- I've tried both hooks (one is supposed to be earlier in the send process) and the results don't change. The original version that worked <24.4 didn't use a hook it all; as far as I can tell it did some magic I don't understand with this: --8<---------------cut here---------------start------------->8--- (defvar %smtpmail-via-smtp (symbol-function 'smtpmail-via-smtp)) (defun smtpmail-via-smtp (recipient smtpmail-text-buffer) (with-current-buffer smtpmail-text-buffer (change-smtp)) (funcall (symbol-value '%smtpmail-via-smtp) recipient smtpmail-text-buffer)) --8<---------------cut here---------------end--------------->8--- Is changing the server/port settings in one of the send-hooks too late? And what is that original magic with the symbols and symbol-function? Robert Thorpe writes: > torys.anderson@gmail.com (Tory S. Anderson) writes: > >> And, at that, it freezes with the final line in my message buffer until I C-g to safety. Any ideas why it freezes at this point, having done the dynamic setting correctly? Note that I've successfully sent with this account today before I started working on the dynamic switching, so I know the settings are otherwise correct. Below are the functions I'm using: > > One of the peculiarities of gmail is that if you're using it over IMAP, > POP and SMTP. It limits the number of transactions you can do with it > per day. People who are having problems with their config often hit > this limit while experimenting. > > However, AFAIK it only applies to receive operations (i.e. IMAP & POP), > not to SMTP. Maybe I'm wrong about that though. Regardless your setup > may magically start working tomorrow. > > BR, > Robert Thorpe