summaryrefslogtreecommitdiff
path: root/lisp/mail
diff options
context:
space:
mode:
authorSimon Josefsson <jas@extundo.com>2004-10-11 18:42:18 +0000
committerSimon Josefsson <jas@extundo.com>2004-10-11 18:42:18 +0000
commite8620cb6ee95b0649794ce977d65d1fb6b5d136a (patch)
tree85c06cd173ddeb767ad0b396eae7b4375f1dcbe6 /lisp/mail
parent98337d2babdd7d13e02a5cc66ee2e727b6f42b4e (diff)
downloademacs-e8620cb6ee95b0649794ce977d65d1fb6b5d136a.tar.gz
(smtpmail-open-stream): Look for
starttls-gnutls-program instead of starttls-program iff starttls-use-gnutls is non-nil. (smtpmail-open-stream): Don't overwrite user settings of starttls-extra-arguments and starttls-extra-args.
Diffstat (limited to 'lisp/mail')
-rw-r--r--lisp/mail/smtpmail.el32
1 files changed, 19 insertions, 13 deletions
diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el
index 84a61350145..d356979ea26 100644
--- a/lisp/mail/smtpmail.el
+++ b/lisp/mail/smtpmail.el
@@ -471,26 +471,32 @@ This is relative to `smtpmail-queue-dir'.")
(if (null (and cred (condition-case ()
(progn
(require 'starttls)
- (call-process starttls-program))
+ (call-process (if starttls-use-gnutls
+ starttls-gnutls-program
+ starttls-program)))
(error nil))))
;; The normal case.
(open-network-stream "SMTP" process-buffer host port)
(let* ((cred-key (smtpmail-cred-key cred))
(cred-cert (smtpmail-cred-cert cred))
(starttls-extra-args
- (when (and (stringp cred-key) (stringp cred-cert)
- (file-regular-p
- (setq cred-key (expand-file-name cred-key)))
- (file-regular-p
- (setq cred-cert (expand-file-name cred-cert))))
- (list "--key-file" cred-key "--cert-file" cred-cert)))
+ (append
+ starttls-extra-args
+ (when (and (stringp cred-key) (stringp cred-cert)
+ (file-regular-p
+ (setq cred-key (expand-file-name cred-key)))
+ (file-regular-p
+ (setq cred-cert (expand-file-name cred-cert))))
+ (list "--key-file" cred-key "--cert-file" cred-cert))))
(starttls-extra-arguments
- (when (and (stringp cred-key) (stringp cred-cert)
- (file-regular-p
- (setq cred-key (expand-file-name cred-key)))
- (file-regular-p
- (setq cred-cert (expand-file-name cred-cert))))
- (list "--x509keyfile" cred-key "--x509certfile" cred-cert))))
+ (append
+ starttls-extra-arguments
+ (when (and (stringp cred-key) (stringp cred-cert)
+ (file-regular-p
+ (setq cred-key (expand-file-name cred-key)))
+ (file-regular-p
+ (setq cred-cert (expand-file-name cred-cert))))
+ (list "--x509keyfile" cred-key "--x509certfile" cred-cert)))))
(starttls-open-stream "SMTP" process-buffer host port)))))
(defun smtpmail-try-auth-methods (process supported-extensions host port)