I have recently moved to emacs as my mail client. I am using message-mode
to write and send email through notmuch
. Specifically, the major mode is called Message[Notmuch]
.
I would like to remap C-c C-c
(mail-send-and-exit
) and C-c C-s
(mail-send
) to safe analogues that require a confirmation in the minibuffer before the email is sent. So far I have:
(defun safe-mail-send-and-exit ()
(interactive)
(if (string-equal (read-from-minibuffer "Are you sure? ") "yes")
(mail-send-and-exit)
(message "Not sent!")))
When I call this function within message-mode
, I get an error:
Symbol’s function definition is void: mail-send-and-exit
How can I pass the context of the email and the mode to my function?