+2001-09-21 Kenichi OKADA <okada@opaopa.org>
+
+ * smtp.el(smtp-submit-package): Check extensions for starttls.
+
2001-07-30 AMAKAWA Shuhei <sa264@cam.ac.uk>
* smtp.el(smtp-submit-package): Send EHLO after starttls.
;;; Commentary:
-;;
+;;
;;; Code:
(defcustom smtp-service "smtp"
"SMTP service port number. \"smtp\" or 25."
:type '(choice (integer :tag "25" 25)
- (string :tag "smtp" "smtp"))
+ (string :tag "smtp" "smtp"))
:group 'smtp)
(defcustom smtp-local-domain nil
(smtp-primitive-helo package)))
(if smtp-use-starttls
(progn
- (smtp-primitive-starttls package)
- (smtp-primitive-ehlo package)))
+ (unless
+ (assq 'starttls
+ (smtp-connection-extensions-internal
+ (smtp-find-connection (current-buffer))))
+ (error "STARTTLS is not supported on this server"))
+ (smtp-primitive-starttls package)
+ (smtp-primitive-ehlo package)))
(if smtp-use-sasl
(smtp-primitive-auth package))
(smtp-primitive-mailfrom package)