summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorKarl Heuer <kwzh@gnu.org>1998-08-29 15:56:41 +0000
committerKarl Heuer <kwzh@gnu.org>1998-08-29 15:56:41 +0000
commitf38d351407f2c700b32fc90f9935c70507b5b14c (patch)
tree958bd1b54d222f673625d8b7270537c10f1a6017 /lisp
parent66cb9c073130581af4df23f0115b021761b330d5 (diff)
downloademacs-f38d351407f2c700b32fc90f9935c70507b5b14c.tar.gz
emacs-f38d351407f2c700b32fc90f9935c70507b5b14c.tar.bz2
emacs-f38d351407f2c700b32fc90f9935c70507b5b14c.zip
(smtpmail-send-it): Add autoload cookie.
(smtpmail-via-smtp): Check that smtpmail-smtp-server is defined.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mail/smtpmail.el15
1 files changed, 7 insertions, 8 deletions
diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el
index 58f6d6af514..8bbb98edd86 100644
--- a/lisp/mail/smtpmail.el
+++ b/lisp/mail/smtpmail.el
@@ -28,16 +28,13 @@
;; Send Mail to smtp host from smtpmail temp buffer.
-;; Please add these lines in your .emacs(_emacs).
+;; Please add these lines in your .emacs(_emacs) or use customize.
;;
-;;(setq send-mail-function 'smtpmail-send-it)
+;;(setq send-mail-function 'smtpmail-send-it) ; if you use `mail'
+;;(setq message-send-mail-function 'smtpmail-send-it) ; if you use `message'
;;(setq smtpmail-default-smtp-server "YOUR SMTP HOST")
-;;(setq smtpmail-smtp-service "smtp")
;;(setq smtpmail-local-domain "YOUR DOMAIN NAME")
-;;(setq smtpmail-debug-info t)
-;;(load-library "smtpmail")
-;;(setq smtpmail-code-conv-from nil)
-;;(setq user-full-name "YOUR NAME HERE")
+;;(setq smtpmail-debug-info t) ; only to debug problems
;; To queue mail, set smtpmail-queue-mail to t and use
;; smtpmail-send-queued-mail to send.
@@ -110,6 +107,7 @@ This is relative to `smtpmail-queue-dir'.")
;;;
;;;
+;;;###autoload
(defun smtpmail-send-it ()
(require 'mail-utils)
(let ((errbuf (if mail-interactive
@@ -298,7 +296,8 @@ This is relative to `smtpmail-queue-dir'.")
(defun smtpmail-via-smtp (recipient smtpmail-text-buffer)
(let ((process nil)
- (host smtpmail-smtp-server)
+ (host (or smtpmail-smtp-server
+ (error "`smtpmail-smtp-server' not defined")))
(port smtpmail-smtp-service)
response-code
greeting