From: Katsumi Yamaoka <yamaoka@jpl.org>
To: Lars Magne Ingebrigtsen <larsi@gnus.org>
Cc: emacs-devel@gnu.org
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 [thread overview]
Message-ID: <b4my60tz7xw.fsf@jpl.org> (raw)
In-Reply-To: E1QZ8Jx-0004jB-EC@colonialone.fsf.org
[-- Attachment #1: Type: text/plain, Size: 764 bytes --]
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. :)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 749 bytes --]
--- 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)))
next parent reply other threads:[~2011-06-23 0:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E1QZ8Jx-0004jB-EC@colonialone.fsf.org>
2011-06-23 0:51 ` Katsumi Yamaoka [this message]
2011-06-23 1:03 ` /srv/bzr/emacs/trunk r104665: Rewritten smtpmail.el to use `open-network-stream' to do STARTTLS Lars Magne Ingebrigtsen
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b4my60tz7xw.fsf@jpl.org \
--to=yamaoka@jpl.org \
--cc=emacs-devel@gnu.org \
--cc=larsi@gnus.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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).