Mercurial > emacs
comparison lisp/mail/smtpmail.el @ 23142:98c430cac424
(smtpmail-send-it): Add autoload cookie.
(smtpmail-via-smtp): Check that smtpmail-smtp-server is defined.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Sat, 29 Aug 1998 15:56:41 +0000 |
parents | cb95bfcd442a |
children | 89d6facea3b5 |
comparison
equal
deleted
inserted
replaced
23141:9676fa7e02bf | 23142:98c430cac424 |
---|---|
26 | 26 |
27 ;;; Commentary: | 27 ;;; Commentary: |
28 | 28 |
29 ;; Send Mail to smtp host from smtpmail temp buffer. | 29 ;; Send Mail to smtp host from smtpmail temp buffer. |
30 | 30 |
31 ;; Please add these lines in your .emacs(_emacs). | 31 ;; Please add these lines in your .emacs(_emacs) or use customize. |
32 ;; | 32 ;; |
33 ;;(setq send-mail-function 'smtpmail-send-it) | 33 ;;(setq send-mail-function 'smtpmail-send-it) ; if you use `mail' |
34 ;;(setq message-send-mail-function 'smtpmail-send-it) ; if you use `message' | |
34 ;;(setq smtpmail-default-smtp-server "YOUR SMTP HOST") | 35 ;;(setq smtpmail-default-smtp-server "YOUR SMTP HOST") |
35 ;;(setq smtpmail-smtp-service "smtp") | |
36 ;;(setq smtpmail-local-domain "YOUR DOMAIN NAME") | 36 ;;(setq smtpmail-local-domain "YOUR DOMAIN NAME") |
37 ;;(setq smtpmail-debug-info t) | 37 ;;(setq smtpmail-debug-info t) ; only to debug problems |
38 ;;(load-library "smtpmail") | |
39 ;;(setq smtpmail-code-conv-from nil) | |
40 ;;(setq user-full-name "YOUR NAME HERE") | |
41 | 38 |
42 ;; To queue mail, set smtpmail-queue-mail to t and use | 39 ;; To queue mail, set smtpmail-queue-mail to t and use |
43 ;; smtpmail-send-queued-mail to send. | 40 ;; smtpmail-send-queued-mail to send. |
44 | 41 |
45 | 42 |
108 | 105 |
109 ;;; | 106 ;;; |
110 ;;; | 107 ;;; |
111 ;;; | 108 ;;; |
112 | 109 |
110 ;;;###autoload | |
113 (defun smtpmail-send-it () | 111 (defun smtpmail-send-it () |
114 (require 'mail-utils) | 112 (require 'mail-utils) |
115 (let ((errbuf (if mail-interactive | 113 (let ((errbuf (if mail-interactive |
116 (generate-new-buffer " smtpmail errors") | 114 (generate-new-buffer " smtpmail errors") |
117 0)) | 115 0)) |
296 (concat (system-name) "." smtpmail-local-domain) | 294 (concat (system-name) "." smtpmail-local-domain) |
297 (system-name))) | 295 (system-name))) |
298 | 296 |
299 (defun smtpmail-via-smtp (recipient smtpmail-text-buffer) | 297 (defun smtpmail-via-smtp (recipient smtpmail-text-buffer) |
300 (let ((process nil) | 298 (let ((process nil) |
301 (host smtpmail-smtp-server) | 299 (host (or smtpmail-smtp-server |
300 (error "`smtpmail-smtp-server' not defined"))) | |
302 (port smtpmail-smtp-service) | 301 (port smtpmail-smtp-service) |
303 response-code | 302 response-code |
304 greeting | 303 greeting |
305 process-buffer | 304 process-buffer |
306 (supported-extensions '())) | 305 (supported-extensions '())) |