From: okada Date: Fri, 21 Sep 2001 12:47:27 +0000 (+0000) Subject: * smtp.el(smtp-submit-package): Check extensions for starttls. X-Git-Tag: slim-1_14_8~8 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=4b117e22a9d248258f29f3348b3cd5eaaaadc561;p=elisp%2Fflim.git * smtp.el(smtp-submit-package): Check extensions for starttls. --- diff --git a/ChangeLog b/ChangeLog index 74d1484..8560a34 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2001-09-21 Kenichi OKADA + + * smtp.el(smtp-submit-package): Check extensions for starttls. + 2001-07-30 AMAKAWA Shuhei * smtp.el(smtp-submit-package): Send EHLO after starttls. diff --git a/smtp.el b/smtp.el index a3f97c6..d699aec 100644 --- a/smtp.el +++ b/smtp.el @@ -27,7 +27,7 @@ ;;; Commentary: -;; +;; ;;; Code: @@ -61,7 +61,7 @@ called from `smtp-via-smtp' with arguments SENDER and RECIPIENTS." (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 @@ -296,8 +296,13 @@ BUFFER may be a buffer or a buffer name which contains mail message." (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)