From 4b117e22a9d248258f29f3348b3cd5eaaaadc561 Mon Sep 17 00:00:00 2001 From: okada Date: Fri, 21 Sep 2001 12:47:27 +0000 Subject: [PATCH] * smtp.el(smtp-submit-package): Check extensions for starttls. --- ChangeLog | 4 ++++ smtp.el | 13 +++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) 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) -- 1.7.10.4