]> git.eshelyaron.com Git - emacs.git/commitdiff
(smtpmail-send-queued-mail): Add autoload cookie.
authorJuanma Barranquero <lekktu@gmail.com>
Mon, 18 Nov 2002 08:58:14 +0000 (08:58 +0000)
committerJuanma Barranquero <lekktu@gmail.com>
Mon, 18 Nov 2002 08:58:14 +0000 (08:58 +0000)
lisp/ChangeLog
lisp/mail/smtpmail.el

index 07cf0e2f672c3b098a47ae8f81262b9ae5828105..5be5a6f3ee7302981306c132a9b684c12e38ce9f 100644 (file)
@@ -1,3 +1,7 @@
+2002-11-18  Juanma Barranquero  <lektu@terra.es>
+
+       * mail/smtpmail.el (smtpmail-send-queued-mail): Add autoload cookie.
+
 2002-11-16  Edward M. Reingold  <reingold@emr.cs.iit.edu>
 
        * calendar/diary-lib.el (make-diary-entry): Allow for local variables
index f3786c47cfeb5789e0768bce26be5013b89bb92a..779bcf3d6c3974a3ee720022c945cabb804127e1 100644 (file)
@@ -39,7 +39,7 @@
 ;;(setq smtpmail-sendto-domain "YOUR DOMAIN NAME")
 ;;(setq smtpmail-debug-info t) ; only to debug problems
 
-;; To queue mail, set smtpmail-queue-mail to t and use 
+;; To queue mail, set smtpmail-queue-mail to t and use
 ;; smtpmail-send-queued-mail to send.
 
 
@@ -59,7 +59,7 @@
   :type '(choice (const nil) string)
   :group 'smtpmail)
 
-(defcustom smtpmail-smtp-server 
+(defcustom smtpmail-smtp-server
   (or (getenv "SMTPSERVER") smtpmail-default-smtp-server)
   "*The name of the host running SMTP server."
   :type '(choice (const nil) string)
@@ -103,7 +103,7 @@ buffer includes an exchange like:
   :type 'boolean
   :group 'smtpmail)
 
-(defcustom smtpmail-queue-mail nil 
+(defcustom smtpmail-queue-mail nil
   "*Specify if mail is queued (if t) or sent immediately (if nil).
 If queued, it is stored in the directory `smtpmail-queue-dir'
 and sent with `smtpmail-send-queued-mail'."
@@ -224,7 +224,7 @@ This is relative to `smtpmail-queue-dir'.")
                             ;; ... then undo escaping of matching parentheses,
                             ;; including matching nested parentheses.
                             (goto-char fullname-start)
-                            (while (re-search-forward 
+                            (while (re-search-forward
                                     "\\(\\=\\|[^\\]\\(\\\\\\\\\\)*\\)\\\\(\\(\\([^\\]\\|\\\\\\\\\\)*\\)\\\\)"
                                     fullname-end 1)
                               (replace-match "\\1(\\3)" t)
@@ -252,16 +252,16 @@ This is relative to `smtpmail-queue-dir'.")
          (setq smtpmail-recipient-address-list
                    (smtpmail-deduce-address-list tembuf (point-min) delimline))
          (kill-buffer smtpmail-address-buffer)
-         
+
          (smtpmail-do-bcc delimline)
          ; Send or queue
          (if (not smtpmail-queue-mail)
              (if (not (null smtpmail-recipient-address-list))
-                 (if (not (smtpmail-via-smtp 
+                 (if (not (smtpmail-via-smtp
                            smtpmail-recipient-address-list tembuf))
                      (error "Sending failed; SMTP protocol error"))
                (error "Sending failed; no recipients"))
-           (let* ((file-data (concat 
+           (let* ((file-data (concat
                               smtpmail-queue-dir
                               (concat (time-stamp-yyyy-mm-dd)
                                       "_" (time-stamp-hh:mm:ss))))
@@ -280,12 +280,12 @@ This is relative to `smtpmail-queue-dir'.")
                (insert (concat
                         "(setq smtpmail-recipient-address-list '"
                         (prin1-to-string smtpmail-recipient-address-list)
-                        ")\n"))                    
+                        ")\n"))
                (write-file file-elisp)
                (set-buffer (generate-new-buffer buffer-scratch))
                (insert (concat file-data "\n"))
-               (append-to-file (point-min) 
-                               (point-max) 
+               (append-to-file (point-min)
+                               (point-max)
                                smtpmail-queue-index)
                )
              (kill-buffer buffer-scratch)
@@ -295,6 +295,7 @@ This is relative to `smtpmail-queue-dir'.")
       (if (bufferp errbuf)
          (kill-buffer errbuf)))))
 
+;;;###autoload
 (defun smtpmail-send-queued-mail ()
   "Send mail that was queued as a result of setting `smtpmail-queue-mail'."
   (interactive)
@@ -315,14 +316,14 @@ This is relative to `smtpmail-queue-dir'.")
        ;; encoding wrongly.
        (setq tembuf (find-file-noselect file-msg nil t))
        (if (not (null smtpmail-recipient-address-list))
-           (if (not (smtpmail-via-smtp smtpmail-recipient-address-list 
+           (if (not (smtpmail-via-smtp smtpmail-recipient-address-list
                                        tembuf))
                (error "Sending failed; SMTP protocol error"))
-         (error "Sending failed; no recipients"))  
+         (error "Sending failed; no recipients"))
        (delete-file file-msg)
        (delete-file (concat file-msg ".el"))
        (kill-buffer tembuf)
-       (kill-line 1))      
+       (kill-line 1))
       (set-buffer buffer-index)
       (save-buffer smtpmail-queue-index)
       (kill-buffer buffer-index)
@@ -374,7 +375,7 @@ This is relative to `smtpmail-queue-dir'.")
            (make-local-variable 'smtpmail-read-point)
            (setq smtpmail-read-point (point-min))
 
-           
+
            (if (or (null (car (setq greeting (smtpmail-read-response process))))
                    (not (integerp (car greeting)))
                    (>= (car greeting) 400))
@@ -480,7 +481,7 @@ This is relative to `smtpmail-queue-dir'.")
                      (>= (car response-code) 400))
                  (throw 'done nil)
                ))
-           
+
            ;; RCPT TO: <recipient>
            (let ((n 0))
              (while (not (null (nth n recipient)))
@@ -494,7 +495,7 @@ This is relative to `smtpmail-queue-dir'.")
                    (throw 'done nil)
                  )
                ))
-           
+
            ;; DATA
            (smtpmail-send-command process "DATA")
 
@@ -558,7 +559,7 @@ This is relative to `smtpmail-queue-dir'.")
       (setq response-strings
            (cons (buffer-substring smtpmail-read-point (- match-end 2))
                  response-strings))
-       
+
       (goto-char smtpmail-read-point)
       (if (looking-at "[0-9]+ ")
          (let ((begin (match-beginning 0))
@@ -573,10 +574,10 @@ This is relative to `smtpmail-queue-dir'.")
                nil
              (setq response-continue nil)
              (setq return-value
-                   (cons (string-to-int 
-                          (buffer-substring begin end)) 
+                   (cons (string-to-int
+                          (buffer-substring begin end))
                          (nreverse response-strings)))))
-       
+
        (if (looking-at "[0-9]+-")
            (progn (if smtpmail-debug-info
                     (message "%s" (car response-strings)))
@@ -585,7 +586,7 @@ This is relative to `smtpmail-queue-dir'.")
          (progn
            (setq smtpmail-read-point match-end)
            (setq response-continue nil)
-           (setq return-value 
+           (setq return-value
                  (cons nil (nreverse response-strings)))
            )
          )))
@@ -609,7 +610,7 @@ This is relative to `smtpmail-queue-dir'.")
           smtpmail-code-conv-from)
       (setq data (string-as-multibyte
                  (encode-coding-string data smtpmail-code-conv-from))))
-       
+
   (if smtpmail-debug-info
       (insert data "\r\n"))
 
@@ -648,12 +649,12 @@ This is relative to `smtpmail-queue-dir'.")
       )
     )
   )
-    
+
 
 (defun smtpmail-deduce-address-list (smtpmail-text-buffer header-start header-end)
   "Get address list suitable for smtp RCPT TO: <address>."
   (require 'mail-utils)  ;; pick up mail-strip-quoted-names
-    
+
   (unwind-protect
       (save-excursion
        (set-buffer smtpmail-address-buffer) (erase-buffer)