emacs-devel
[Top][All Lists]
Advanced

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

Re: /srv/bzr/emacs/trunk r104665: Rewritten smtpmail.el to use `open-net


From: Katsumi Yamaoka
Subject: Re: /srv/bzr/emacs/trunk r104665: Rewritten smtpmail.el to use `open-network-stream' to do STARTTLS
Date: Thu, 23 Jun 2011 09:51:23 +0900
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (cygwin)

Lars Magne Ingebrigtsen wrote:
[...]
> --- a/lisp/mail/smtpmail.el   2011-05-30 17:23:47 +0000
> +++ b/lisp/mail/smtpmail.el   2011-06-21 21:10:52 +0000
[...]
> +       (setq result
> +             (open-network-stream
> +              "smtpmail" process-buffer host port
> +              :type smtpmail-stream-type
> +              :return-list t

I've been using smtpmail with replacing `open-network-stream' with
`my-open-network-stream'.  That does login to the remote host by
ssh and connects to the smtp port of the host using netcat.  For
the recent change (adding :return-list t), I've modified my function
so as to return (PROCESS :greeting "200 Ok") rather than PROCESS.
If there's a similar old program in the world, the following patch
will help.  But please ignore it if it is not worth installing. :)

--- smtpmail.el~        2011-06-22 22:06:16.593125000 +0000
+++ smtpmail.el 2011-06-23 00:48:05.562125000 +0000
@@ -652,3 +652,3 @@
          ;; If we couldn't access the server at all, we give up.
-         (unless (setq process (car result))
+         (unless (setq process (or (car-safe result) result))
            (throw 'done "Unable to contact server"))
@@ -658,2 +658,3 @@
 
+         (when (consp result)
          (let* ((greeting (plist-get (cdr result) :greeting))
@@ -664,2 +665,3 @@
              (throw 'done (format "Connection not allowed: %s" greeting))))
+         )
          
@@ -670,3 +672,3 @@
 
-           (let* ((capabilities (plist-get (cdr result) :capabilities))
+           (let* ((capabilities (plist-get (cdr-safe result) :capabilities))
                   (code (smtpmail-response-code capabilities)))

reply via email to

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