(wl-draft): Use `wl-draft-insert-ccs' for Bcc and FCC.
* wl-vars.el (wl-draft-delete-myself-from-bcc-fcc): New variable.
Non-nil \e$B$J$i!"<+J,08$F$N%a!<%k$KJV?.$9$k>l9g!">o$K\e(B @samp{To:},
@samp{Cc:} \e$B$+$i<+J,$N%a!<%k%"%I%l%9$r:o=|$7$^$9!#\e(B
+@item wl-draft-delete-myself-from-bcc-fcc
+@vindex wl-draft-delete-myself-from-bcc-fcc
+Non-nil \e$B$G!"\e(B@samp{To:}, @samp{Cc:} \e$B$,\e(B \e$BJQ?t\e(B @code{wl-subscribed-mailing-list} \e$B$K\e(B
+\e$B4^$^$l$F$$$k>l9g!"\e(B@samp{Bcc:} , @samp{FCC:} \e$B$r$D$1$^$;$s!%\e(B
+
@item wl-smtp-posting-server
@vindex wl-smtp-posting-server
\e$B=i4|@_Dj$O\e(B @code{nil}\e$B!#\e(B
If non-nil, always removes your own address from @samp{To:} and
@samp{Cc:} when you are replying to the mail addressed to you.
+@item wl-draft-delete-myself-from-bcc-fcc
+@vindex wl-draft-delete-myself-from-bcc-fcc
+If any of @code{wl-subscribed-mailing-list} are contained in @samp{To:}
+or @samp{Cc:} field, do not insert @samp{Bcc:} or @samp{FCC:} field.
+
@item wl-smtp-posting-server
@vindex wl-smtp-posting-server
The initial setting is @code{nil}.
+2001-02-17 Kenichi OKADA <okada@opaopa.org>
+
+ * wl-draft.el (wl-draft-insert-ccs): New function.
+ (wl-draft): Use `wl-draft-insert-ccs' for Bcc and FCC.
+ * wl-vars.el (wl-draft-delete-myself-from-bcc-fcc): New variable.
+
2001-02-15 Yuuichi Teranishi <teranisi@gohome.org>
* wl-summary.el (wl-cache-prefetch-message): Fixed last change.
(setq wl-draft-buffer-file-name file-name)
(if mail-default-reply-to
(insert "Reply-To: " mail-default-reply-to "\n"))
- (if (or wl-bcc mail-self-blind)
- (insert "Bcc: " (or wl-bcc (user-login-name)) "\n"))
- (if wl-fcc
- (insert "FCC: " (if (functionp wl-fcc) (funcall wl-fcc) wl-fcc) "\n"))
+ (wl-draft-insert-ccs "Bcc: " (or wl-bcc
+ (and mail-self-blind (user-login-name))))
+ (wl-draft-insert-ccs "FCC: " wl-fcc)
(if wl-organization
(insert "Organization: " wl-organization "\n"))
(and wl-auto-insert-x-face
(when content-type
(insert "Content-type: " content-type "\n"))
(when content-transfer-encoding
- (insert "Content-Transfer-encoding: " content-transfer-encoding "\n"))
+ (insert "Content-Transfer-Encoding: " content-transfer-encoding "\n"))
(if (or content-type content-transfer-encoding)
(insert "\n"))
(and body (insert body))
wl-summary-buffer-name)))
buf-name))
+(defsubst wl-draft-insert-ccs (str cc)
+ (let ((field
+ (if (functionp cc)
+ (funcall cc)
+ cc)))
+ (if (and field
+ (null (and wl-draft-delete-myself-from-bcc-fcc
+ (elmo-list-member
+ (mapcar 'wl-address-header-extract-address
+ (append
+ (wl-parse-addresses (std11-field-body "To"))
+ (wl-parse-addresses (std11-field-body "Cc"))))
+ (mapcar 'downcase wl-subscribed-mailing-list)))))
+ (insert str field "\n"))))
+
(defun wl-draft-elmo-nntp-send ()
(let ((elmo-nntp-post-pre-hook wl-news-send-pre-hook)
(elmo-default-nntp-user
:type 'boolean
:group 'wl-draft)
+(defcustom wl-draft-delete-myself-from-bcc-fcc nil
+ "*Do not insert bcc or fcc if To and Cc fields is a member of
+`wl-subscribed-mailing-list'"
+ :type 'boolean
+ :group 'wl-draft)
+
(defcustom wl-draft-resume-folder-window t
"*Resume folder window in `wl-draft-hide'."
:type 'boolean