From: okada Date: Wed, 24 Jul 2002 17:49:55 +0000 (+0000) Subject: Synch up with flim-1_14 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2fc9646a13a99babb0caaf15768919f72cb31715;p=elisp%2Fflim.git Synch up with flim-1_14 --- diff --git a/ChangeLog b/ChangeLog index daa1372..096c65a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2002-07-24 Katsumi Yamaoka + + * smtp.el (smtp-end-of-line): New variable. + (smtp-read-response): Use it. + (smtp-send-command): Use it. + (smtp-send-data): Use it. + + 2001-02-20 Kenichi OKADA * SLIM: Version 1.14.8 released. diff --git a/SLIM-VERSION b/SLIM-VERSION index 17447df..176c0ad 100644 --- a/SLIM-VERSION +++ b/SLIM-VERSION @@ -17,4 +17,4 @@ l.14.3 篠原ともえ 1.14.5 安達祐実 1.14.6 馬渕英里何 1.14.7 酒井彩名 -1.14.7 小池栄子 +1.14.8 小池栄子 diff --git a/smtp.el b/smtp.el index 4531880..a59108e 100644 --- a/smtp.el +++ b/smtp.el @@ -133,6 +133,17 @@ don't define this value." (defvar smtp-submit-package-function #'smtp-submit-package) +(defvar smtp-end-of-line "\r\n" + "*String to use on the end of lines when talking to the SMTP server. +This is \"\\r\\n\" by default, but should be \"\\n\" when using and +indirect connection method, e.g. bind `smtp-open-connection-function' +to a custom function as shown below: + +\(setq smtp-open-connection-function + (lambda (name buffer host service) + (start-process name buffer \"ssh\" \"-C\" host + \"telnet\" \"-8\" host service)))") + ;;; @ SMTP package ;;; A package contains a mail message, an envelope sender address, ;;; and one or more envelope recipient addresses. In ESMTP model @@ -601,13 +612,13 @@ BUFFER may be a buffer or a buffer name which contains mail message." response) (while response-continue (goto-char smtp-read-point) - (while (not (search-forward "\r\n" nil t)) + (while (not (search-forward smtp-end-of-line nil t)) (accept-process-output (smtp-connection-process-internal connection)) (goto-char smtp-read-point)) (if decoder (let ((string (buffer-substring smtp-read-point (- (point) 2)))) (delete-region smtp-read-point (point)) - (insert (funcall decoder string) "\r\n"))) + (insert (funcall decoder string) smtp-end-of-line))) (setq response (nconc response (list (buffer-substring @@ -629,7 +640,7 @@ BUFFER may be a buffer or a buffer name which contains mail message." (smtp-connection-encoder-internal connection))) (set-buffer (process-buffer process)) (goto-char (point-max)) - (setq command (concat command "\r\n")) + (setq command (concat command smtp-end-of-line)) (insert command) (setq smtp-read-point (point)) (if encoder @@ -643,8 +654,8 @@ BUFFER may be a buffer or a buffer name which contains mail message." (smtp-connection-encoder-internal connection))) ;; Escape "." at start of a line. (if (eq (string-to-char data) ?.) - (setq data (concat "." data "\r\n")) - (setq data (concat data "\r\n"))) + (setq data (concat "." data smtp-end-of-line)) + (setq data (concat data smtp-end-of-line))) (if encoder (setq data (funcall encoder data))) (process-send-string process data)))