changeset 86256:b53cbc241b6f

(message-send-mail-function): Check for smtpmail too.
author Reiner Steib <Reiner.Steib@gmx.de>
date Tue, 20 Nov 2007 21:49:06 +0000
parents 50442c77e242
children 99cb1a203e08
files lisp/gnus/ChangeLog lisp/gnus/message.el
diffstat 2 files changed, 10 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/gnus/ChangeLog	Tue Nov 20 21:06:35 2007 +0000
+++ b/lisp/gnus/ChangeLog	Tue Nov 20 21:49:06 2007 +0000
@@ -1,5 +1,7 @@
 2007-11-20  Reiner Steib  <Reiner.Steib@gmx.de>
 
+	* message.el (message-send-mail-function): Check for smtpmail too.
+
 	* utf7.el (utf7-encode, utf7-decode): Use coding system
 	`utf-7'/`utf-7-imap' from utf-7.el' if available.
 
--- a/lisp/gnus/message.el	Tue Nov 20 21:06:35 2007 +0000
+++ b/lisp/gnus/message.el	Tue Nov 20 21:49:06 2007 +0000
@@ -624,13 +624,17 @@
 (defun message-send-mail-function ()
   "Return suitable value for the variable `message-send-mail-function'."
   (cond ((and sendmail-program
-	      (executable-find program))
+	      (executable-find sendmail-program))
 	 'message-send-mail-with-sendmail)
-	((and (locate-library "mailclient")
-	      (memq system-type '(darwin windows-nt)))
+	((and (locate-library "smtpmail")
+	      (require 'smtpmail)
+	      smtpmail-default-smtp-server)
+	 'message-smtpmail-send-it)
+	((locate-library "mailclient")
 	 'message-send-mail-with-mailclient)
 	(t
-	 'message-smtpmail-send-it)))
+	 (lambda ()
+	   (error "Don't know how to send mail.  Please customize `message-send-mail-function'.")))))
 
 ;; Useful to set in site-init.el
 (defcustom message-send-mail-function (message-send-mail-function)