From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/81984 Path: news.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.gnus.general Subject: Re: Can't send message through smtp with gmail Date: Thu, 28 Jun 2012 07:28:56 +0900 Organization: Emacsen advocacy group Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1340836192 18244 80.91.229.3 (27 Jun 2012 22:29:52 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 27 Jun 2012 22:29:52 +0000 (UTC) Cc: ding@gnus.org To: mihkel Original-X-From: ding-owner+M30254@lists.math.uh.edu Thu Jun 28 00:29:51 2012 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Sk0k8-0006Zr-4k for ding-account@gmane.org; Thu, 28 Jun 2012 00:29:48 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1Sk0jZ-0008Tu-JJ; Wed, 27 Jun 2012 17:29:13 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1Sk0jY-0008Tk-11 for ding@lists.math.uh.edu; Wed, 27 Jun 2012 17:29:12 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1Sk0jW-0005f6-Dp for ding@lists.math.uh.edu; Wed, 27 Jun 2012 17:29:11 -0500 Original-Received: from orlando.hostforweb.net ([216.246.45.90]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1Sk0jT-0001EX-Vv for ding@gnus.org; Thu, 28 Jun 2012 00:29:08 +0200 Original-Received: from localhost ([127.0.0.1]:58059) by orlando.hostforweb.net with smtp (Exim 4.77) (envelope-from ) id 1Sk0jM-0006PG-Ln; Wed, 27 Jun 2012 17:29:01 -0500 X-Face: #kKnN,xUnmKia.'[pp`;Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu;B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( Cancel-Lock: sha1:jyYf1l5L7sNl7/4OKmjWIPpnYh0= X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - orlando.hostforweb.net X-AntiAbuse: Original Domain - gnus.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - jpl.org X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: -1.9 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:81984 Archived-At: mihkel wrote: > Recently I upgraded to Fedora 17 and to Emacs 24. > M-x emacs-version: > GNU Emacs 24.0.97.1 (x86_64-redhat-linux-gnu, GTK+ Version 2.24.10) of > 2012-05-21 on x86-15.phx2.fedoraproject.org > M-x gnus-version > Ma Gnus v0.6 > After that upgrade I can't send any messages. Error that is shown in > Messages buffer is: [...] > I think the relevant snippet from gnus init file is: [...] > (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)) [...] `smtpmail-via-smtp' now takes three arguments: (smtpmail-via-smtp RECIPIENT SMTPMAIL-TEXT-BUFFER &optional ASK-FOR-PASSWORD) How about replacing those `(defvar ...' and `(defun ...' with the defadvice form as follows rather than redefining the function? (defadvice smtpmail-via-smtp (before change-smtp activate) "Run `change-smtp' in advance." (with-current-buffer smtpmail-text-buffer (change-smtp))) This is essentially the same, but you don't have to care the arguments spec change.