feedmail-queue-buffer-file-name

feedmail-queue-buffer-file-name is a variable defined in `feedmail.el'.
Its value is
nil


Documentation:
If non-nil, has the value normally expected of 'buffer-file-name'.
You are not intended to set this to something in your configuration. Rather,
you might programmatically set it to something via a hook or function
advice or whatever. You might like to do this if you are using a mail
composition program that eventually uses sendmail.el's 'mail-send'
function to process the message. If there is a filename associated
with the message buffer, 'mail-send' will ask you for confirmation.
There's no trivial way to avoid it. It's unwise to just set the value
of 'buffer-file-name' to nil because that will defeat feedmail's file
management features. Instead, arrange for this variable to be set to
the value of 'buffer-file-name' before setting that to nil. An easy way
to do that would be with defadvice on 'mail-send' (undoing the
assignments in a later advice).

feedmail will pretend that 'buffer-file-name', if nil, has the value
assigned of 'feedmail-queue-buffer-file-name' and carry out its normal
activities. feedmail does not restore the non-nil value of
'buffer-file-name'. For safe bookkeeping, the user should insure that
feedmail-queue-buffer-file-name is restored to nil.

Example 'defadvice' for mail-send:

(defadvice mail-send (before feedmail-mail-send-before-advice activate)
(setq feedmail-queue-buffer-file-name buffer-file-name)
(setq buffer-file-name nil))

(defadvice mail-send (after feedmail-mail-send-after-advice activate)
(if feedmail-queue-buffer-file-name (setq buffer-file-name feedmail-queue-buffer-file-name))
(setq feedmail-queue-buffer-file-name nil))