* smtp.el (smtp-starttls-program): New user option.
authorueno <ueno>
Tue, 17 Feb 2004 01:53:01 +0000 (01:53 +0000)
committerueno <ueno>
Tue, 17 Feb 2004 01:53:01 +0000 (01:53 +0000)
(smtp-starttls-extra-args): New user option.
(smtp-send-buffer): Bind starttls-program and starttls-extra-args.

ChangeLog
smtp.el

index 4cc011b..877d922 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2004-02-17  Daiki Ueno  <ueno@unixuser.org>
+
+       * smtp.el (smtp-starttls-program): New user option.
+       (smtp-starttls-extra-args): New user option.
+       (smtp-send-buffer): Bind starttls-program and starttls-extra-args.
+
 2004-01-27  Yuuichi Teranishi  <teranisi@gohome.org>
 
        * mel-q.el (quoted-printable-external-decoder-option-to-specify-file): 
diff --git a/smtp.el b/smtp.el
index ff13f5a..31e393d 100644 (file)
--- a/smtp.el
+++ b/smtp.el
@@ -102,6 +102,14 @@ don't define this value."
   :type 'boolean
   :group 'smtp-extensions)
 
+(defcustom smtp-starttls-program "starttls"
+  "The program to run in a subprocess to open an TLSv1 connection."
+  :group 'smtp-extensions)
+
+(defcustom smtp-starttls-extra-args nil
+  "Extra arguments to `starttls-program'"
+  :group 'smtp-extensions)
+
 (defcustom smtp-use-sasl nil
   "If non-nil, use SMTP Authentication (RFC2554) if available."
   :type 'boolean
@@ -343,17 +351,19 @@ RECIPIENTS is a list of envelope recipient addresses.
 BUFFER may be a buffer or a buffer name which contains mail message."
   (if smtp-send-by-myself
       (smtp-send-buffer-by-myself sender recipients buffer)
-    (let ((server
-          (if (functionp smtp-server)
-              (funcall smtp-server sender recipients)
-            (or smtp-server
-                (error "`smtp-server' not defined"))))
-         (package
-          (smtp-make-package sender recipients buffer))
-         (smtp-open-connection-function
-          (if smtp-use-starttls
-              #'starttls-open-stream
-            smtp-open-connection-function)))
+    (let* ((server
+           (if (functionp smtp-server)
+               (funcall smtp-server sender recipients)
+             (or smtp-server
+                 (error "`smtp-server' not defined"))))
+          (package
+           (smtp-make-package sender recipients buffer))
+          (starttls-program smtp-starttls-program)
+          (starttls-extra-args smtp-starttls-extra-args)
+          (smtp-open-connection-function
+           (if smtp-use-starttls
+               #'starttls-open-stream
+             smtp-open-connection-function)))
       (save-excursion
        (set-buffer
         (get-buffer-create