My attachment check
Before sending a message, signal an error
if the message mentions attachments but none exist 1.
(with-eval-after-load 'notmuch
(add-hook 'notmuch-mua-send-hook
#'notmuch-mua-attachment-check))
Footnotes:
1
“Mentions attachments” as per the notmuch-mua-attachment-regexp
.