# HG changeset patch # User Simon Josefsson # Date 1097520120 0 # Node ID 2b938e7f92a5b11e486db88d18a6e831c44614e1 # Parent 1776f7c5e250b1da0e90b6a389d6fad44361a67b (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. diff -r 1776f7c5e250 -r 2b938e7f92a5 lisp/mail/smtpmail.el --- a/lisp/mail/smtpmail.el Mon Oct 11 14:58:54 2004 +0000 +++ b/lisp/mail/smtpmail.el Mon Oct 11 18:42:00 2004 +0000 @@ -471,26 +471,32 @@ (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)