all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Binjo <binjo.cn@gmail.com>
To: emacs-devel@gnu.org
Subject: issue of smtpmail-via-smtp
Date: Tue, 05 Jul 2011 11:29:34 +0800	[thread overview]
Message-ID: <20fwmle76p.fsf@gmail.com> (raw)

hi,

i'm using the latest no gnus and gnu emacs 24 under windows, with gnutls
enabled. the following changes allows me to send mail as usual, it turns out
`network-stream-get-response' will wait for the ":end-of-command" infinitly,
when searching for "^[0-9]+ .*\r\n". should there be a timeout check?

this change just works for me, i'm no expert of gnus/smtpmail protocol, so
please verify this, thanks.

binjo

diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el
index b168506..a92b54f 100644
--- a/lisp/mail/smtpmail.el
+++ b/lisp/mail/smtpmail.el
@@ -622,14 +622,14 @@ The list is in preference order.")
                 "smtpmail" process-buffer host port
                 :type smtpmail-stream-type
                 :return-list t
-                :capability-command (format "EHLO %s\r\n" (smtpmail-fqdn))
-                :end-of-command "^[0-9]+ .*\r\n"
+                :capability-command (format "EHLO %s\n" (smtpmail-fqdn))
+                :end-of-command "^[0-9]+ .*\n"
                 :success "^2.*\n"
                 :always-query-capabilities t
                 :starttls-function
                 (lambda (capabilities)
                   (and (string-match "-STARTTLS" capabilities)
-                       "STARTTLS\r\n"))
+                       "STARTTLS\n"))
                 :client-certificate t
                 :use-starttls-if-possible t))

@@ -664,7 +664,7 @@ The list is in preference order.")
                               ""
                               (split-string
                                (plist-get (cdr result) :capabilities)
-                               "\r\n")))
+                               "\n")))
                  (let ((name
                         (with-case-table ascii-case-table
                           (mapcar (lambda (s) (intern (downcase s)))
@@ -812,7 +812,7 @@ The list is in preference order.")
     (catch 'done
       (while response-continue
        (goto-char smtpmail-read-point)
-       (while (not (search-forward "\r\n" nil t))
+       (while (not (search-forward "\n" nil t))
          (unless (memq (process-status process) '(open run))
            (throw 'done nil))
          (accept-process-output process)



             reply	other threads:[~2011-07-05  3:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-05  3:29 Binjo [this message]
2011-07-05 11:29 ` issue of smtpmail-via-smtp Christoph Scholtes
2011-07-05 13:40   ` Lars Magne Ingebrigtsen
2011-07-06  0:55     ` Binjo
2011-07-06  1:10       ` Christoph Scholtes
2011-07-06  1:28         ` Binjo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20fwmle76p.fsf@gmail.com \
    --to=binjo.cn@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.