From: ueno Date: Sun, 5 Nov 2000 20:52:09 +0000 (+0000) Subject: * qmtp.el (qmtp-send-package): Don't check "K" reply per recipient. X-Git-Tag: deisui-1_14_0-1~3 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=d1eaa315890473e9342cf85ebe3d64d534173fbe;p=elisp%2Fflim.git * qmtp.el (qmtp-send-package): Don't check "K" reply per recipient. (qmtp-via-smtp): Mark as obsolete. (qmtp-send-buffer): New function. --- diff --git a/ChangeLog b/ChangeLog index 4c9ad08..d04b4fe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2000-11-05 Daiki Ueno + * qmtp.el (qmtp-send-package): Don't check "K" reply per recipient. + (qmtp-via-smtp): Mark as obsolete. + (qmtp-send-buffer): New function. + * sasl.texi: New file. 2000-11-05 Daiki Ueno diff --git a/qmtp.el b/qmtp.el index e9560c0..dc37b92 100644 --- a/qmtp.el +++ b/qmtp.el @@ -24,7 +24,12 @@ ;;; Commentary: -;; + +;; Installation: + +;; To send mail using QMTP instead of SMTP, do + +;; (fset 'smtp-via-smtp 'qmtp-via-qmtp) ;;; Code: @@ -86,20 +91,30 @@ called from `qmtp-via-qmtp' with arguments SENDER and RECIPIENTS.") recipients ""))) (process-send-region process (point-min)(point-max))) (goto-char qmtp-read-point) - (while recipients - (while (and (memq (process-status process) '(open run)) - (not (re-search-forward "^[0-9]+:" nil 'noerror))) - (or (accept-process-output process qmtp-timeout) - (error "timeout expired: %d" qmtp-timeout)) - (goto-char qmtp-read-point)) - (let ((response (char-after (match-end 0)))) - (if (not (eq response ?K)) - (error (nth 1 (assq response qmtp-error-response-alist)))) - (setq recipients (cdr recipients)) - (beginning-of-line 2) - (setq qmtp-read-point (point))))) - -(defun qmtp-via-qmtp (sender recipients buffer) + (while (and (memq (process-status process) '(open run)) + (not (re-search-forward "^[0-9]+:" nil 'noerror))) + (unless (accept-process-output process qmtp-timeout) + (error "timeout expired: %d" qmtp-timeout)) + (goto-char qmtp-read-point)) + (let ((response (char-after (match-end 0)))) + (unless (eq response ?K) + (error (nth 1 (assq response qmtp-error-response-alist)))) + (setq recipients (cdr recipients)) + (beginning-of-line 2) + (setq qmtp-read-point (point)))) + +;;;###autoload +(defun qmtp-via-smtp (sender recipients buffer) + (condition-case nil + (progn + (qmtp-send-buffer sender recipients buffer) + t) + (error))) + +(make-obsolete 'qmtp-via-smtp "It's old API.") + +;;;###autoload +(defun qmtp-send-buffer (sender recipients buffer) (save-excursion (set-buffer (get-buffer-create @@ -115,11 +130,7 @@ called from `qmtp-via-qmtp' with arguments SENDER and RECIPIENTS.") (setq process (funcall qmtp-open-connection-function "QMTP" (current-buffer) qmtp-server qmtp-service))) - (condition-case nil - (progn - (qmtp-send-package process sender recipients buffer) - t) - (error))) + (qmtp-send-package process sender recipients buffer)) (when (and process (memq (process-status process) '(open run))) ;; QUIT