* wl-news.el.in (wl-news-send-to-address): New variable.
authoryoichi <yoichi>
Fri, 20 Dec 2002 09:51:30 +0000 (09:51 +0000)
committeryoichi <yoichi>
Fri, 20 Dec 2002 09:51:30 +0000 (09:51 +0000)
(wl-news-send-news): Use it.
(wl-news-check): Call wl-news-send-news if wl-news-send-to-address.

wl/ChangeLog
wl/wl-news.el.in

index 4cf51dc..a34b9d0 100644 (file)
@@ -1,3 +1,9 @@
+2002-12-20  Yoichi NAKAYAMA  <yoichi@eken.phys.nagoya-u.ac.jp>
+
+       * wl-news.el.in (wl-news-send-to-address): New variable.
+       (wl-news-send-news): Use it.
+       (wl-news-check): Call wl-news-send-news if wl-news-send-to-address.
+
 2002-12-20  Kenichi OKADA  <okada@opaopa.org>
 
        * wl-news.el.in (wl-news-send-news): Delete
index 0a2e8d0..1e6d7ae 100644 (file)
 (require 'wl-vars)
 (require 'wl-util)
 (require 'wl-address)
-(require 'wl-draft)
 (require 'wl-folder)
-(require 'wl-mime)
 
 (defvar wl-news-version-file-name "previous-version")
 (defvar wl-news-default-previous-version '(2 0 0))
 
+(defvar wl-news-send-to-address nil
+  "*The recipient address to send NEWS.")
+
 (defun wl-news-check ()
   (let ((previous-version (wl-news-previous-version-load))
        (current-version (product-version (product-find 'wl-version))))
     (if (and (< 0 (product-version-compare
                   current-version previous-version))
             wl-news-lang
+            wl-news-send-to-address
             (wl-news-send-news previous-version))
        (wl-news-previous-version-save current-version))))
 
@@ -94,6 +96,7 @@
       (kill-buffer tmp-buffer))))
 
 (defun wl-news-append-news (lang previous-version)
+  (require 'wl-mime)
   (let* ((news-list (cdr (assoc lang wl-news-news-alist))))
     (mime-edit-insert-tag "text" "plain" "" "")
     (while (< 0
       (setq news-list (cdr news-list)))))
 
 (defun wl-news-send-news (previous-version)
+  (require 'wl-draft)
   (let ((lang (if (listp wl-news-lang)
                  wl-news-lang
-               (list wl-news-lang))))
+               (list wl-news-lang)))
+       wl-fcc wl-bcc)
     (save-window-excursion
       (wl-draft-create-buffer)
       (wl-draft-create-contents
           (list (cons 'From "WL Release 'Bot <wl@lists.airs.net>")
-                (cons 'To (wl-draft-eword-encode-address-list wl-from) )
+                (cons 'To (wl-draft-eword-encode-address-list
+                           wl-news-send-to-address))
                 (cons 'Subject "Wanderlust NEWS")
                 (cons 'User-Agent wl-generate-mailer-string-function)))
       (wl-draft-insert-mail-header-separator)
       (wl-draft-prepare-edit)
       (goto-char (point-max))
+      (insert "This message is automatically generated by Wanderlust.\n")
       (while (car lang)
        (wl-news-append-news
         (car lang) previous-version)