emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

issue of smtpmail-via-smtp


From: Binjo
Subject: issue of smtpmail-via-smtp
Date: Tue, 05 Jul 2011 11:29:34 +0800
User-agent: Emacs Gnus

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 via email to

[Prev in Thread] Current Thread [Next in Thread]