(let ((response
(smtp-read-response
(smtp-stream-process-internal trans))))
- (or (smtp-check-response response)
+ (or (= (car response) 220)
(tram-stream-error trans 'greeting))
trans))
-
+
(defun smtp-ehlo (trans)
(smtp-send-command
(smtp-stream-process-internal trans)
(let ((response
(smtp-read-response
(smtp-stream-process-internal trans))))
- (or (smtp-check-response response)
+ (or (= (car response) 250)
(tram-stream-error trans 'ehlo))
(smtp-stream-set-extensions-internal
trans (mapcar
(let ((response
(smtp-read-response
(smtp-stream-process-internal trans))))
- (or (smtp-check-response response)
+ (or (= (car response) 250)
(tram-stream-error trans 'helo))
trans))
(let ((response
(smtp-read-response
(smtp-stream-process-internal trans))))
- (or (smtp-check-response response)
+ (or (= (car response) 250)
(tram-stream-error trans 'mailfrom))
trans))
(setq response
(smtp-read-response
(smtp-stream-process-internal trans)))
- (or (smtp-check-response response)
+ (or (memq (car response) '(250 251))
(tram-stream-error trans 'rcptto))
trans))
(let ((response
(smtp-read-response
(smtp-stream-process-internal trans))))
- (or (smtp-check-response response)
+ (or (= (car response) 354)
(tram-stream-error trans 'data))
;; Mail contents
(setq response
(smtp-read-response
(smtp-stream-process-internal trans)))
- (or (smtp-check-response response)
+ (or (= (car response) 250)
(tram-stream-error trans 'data))
trans))
(setq smtp-read-point match-end))
response))
-(defun smtp-check-response (response)
- (memq (/ (car response) 100) '(2 3)));; XXX
-
(defun smtp-send-command (process command)
(goto-char (point-max))
(insert command "\r\n")