From 34d72f833828f2ef5f174cbbfc23bd69b67fbe42 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Thu, 13 Nov 2014 00:08:51 -0500 Subject: Confirm address when sending mail --- lisp/init-gnus.el | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lisp/init-gnus.el b/lisp/init-gnus.el index fd02df2..bd0f072 100644 --- a/lisp/init-gnus.el +++ b/lisp/init-gnus.el @@ -72,6 +72,14 @@ (gnus-group-exit)))) (add-hook 'kill-emacs-hook 'gnus-grace-exit-before-kill-emacs) +(defun km/message-confirm-sender () + "Stop sending message from the wrong address." + (unless (yes-or-no-p (format "Send message from %s?" + (message-field-value "From"))) + (user-error "Not sending message"))) + +(add-hook 'message-send-hook 'km/message-confirm-sender) + ;; Start in topic mode. (add-hook 'gnus-group-mode-hook 'gnus-topic-mode) -- cgit v1.2.3