;;; wl-spam.el

;; Copyright (C) 2001, 2002 Kenichi OKADA <okada@opaopa.org>

;; Author: Kenichi OKADA <okada@opaopa.org>

;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as
;; published by the Free Software Foundation; either version 2, or (at
;; your option) any later version.

;; This program is distributed in the hope that it will be useful, but
;; WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
;; General Public License for more details.

;; You should have received a copy of the GNU General Public License
;; along with this program; see the file COPYING.  If not, write to the
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.

;;; Commentary:

;; usage:
;;
;; If you use wl-2.9.4 or before, you should use wl-spam.el-2.9.4
;; Do not use this if you do not know how to use it.
;;
;; (add-hook 'wl-mail-send-pre-hook 'wl-spam)
;;
;; To: real-recipient
;; Sto: fake-recipient
;;
;; Field "Sto:" is override field "To:".
;; You can use Scc: ,too.
;;
;;; Code:

(defun wl-spam ()
  (let ((sto (std11-field-body "sto"))
	(scc (std11-field-body "scc"))
	delimline)
    (when sto
      (wl-draft-delete-field "To" delimline sto)
      (wl-draft-delete-field "sto" delimline))
    (when scc
      (wl-draft-delete-field "Cc" delimline scc)
      (wl-draft-delete-field "scc" delimline))))

(provide 'wl-spam)

;;; wl-spam.el ends here
