From: yamaoka Date: Wed, 24 Jul 2002 06:55:17 +0000 (+0000) Subject: * smtp.el (smtp-end-of-line): New variable. X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=486b68204c8e7fbb84d01aa83d8dc47a8d9051d8;p=elisp%2Fflim.git * smtp.el (smtp-end-of-line): New variable. (smtp-read-response): Use it. (smtp-send-command): Use it. (smtp-send-data): Use it. --- diff --git a/ChangeLog b/ChangeLog index 52c59a7..242e304 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. + + 2002-06-03 MORIOKA Tomohiko * FLIM: Version 1.14.4 (Kashiharajing-Dþ-mae) released.-A @@ -292,7 +300,7 @@ 2001-02-27 Shuhei KOBAYASHI MIME Parameter Value decoder support. - + * mime-def.el (std11-quoted-pair-regexp, std11-non-qtext-char-list, std11-qtext-regexp, std11-quoted-string-regexp): Removed. (mime-media-type/subtype-regexp): Ditto. @@ -316,7 +324,7 @@ mime-parse-Content-Transfer-Encoding): New implementation. (mime-read-Content-Type, mime-read-Content-Disposition, mime-read-Content-Transfer-Encoding): Ditto. - + 2001-02-26 Shuhei KOBAYASHI * hmac-md5.el, hmac-sha1.el: Modify comments. @@ -787,7 +795,7 @@ 2000-11-12 Daiki Ueno - * luna.el + * luna.el (luna-apply-generic): New function. (luna-define-generic): Use `luna-apply-generic' instead of `luna-send'. @@ -1121,8 +1129,8 @@ 2000-05-25 Tanaka Akira - * mime-en.sgml, mime-ja.sgml: Update for CVS via SSH. - + * mime-en.sgml, mime-ja.sgml: Update for CVS via SSH. + 2000-05-09 Katsumi Yamaoka * smtp.el (smtp-deduce-address-list): Set `case-fold-search' to `t' @@ -1438,7 +1446,7 @@ * FLIM: Version 1.13.2 (Kasanui) released. 1999-08-03 Yuuichi Teranishi - + * smtp.el (smtp-notify-success): New option. * (smtp-via-smtp): Request return receipt (defined in RFC1891) to SMTP server if `smtp-notify-success' is non-nil. diff --git a/smtp.el b/smtp.el index 23db68d..ff3cf49 100644 --- a/smtp.el +++ b/smtp.el @@ -122,6 +122,17 @@ don't define this value." (defvar smtp-submit-package-function (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 @@ -502,13 +513,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 @@ -530,7 +541,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 @@ -544,8 +555,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)))