Make Message warn about invalid addresses
* lisp/gnus/message.el (message-check-recipients): Warn about invalid email addresses (bug#32639).
This commit is contained in:
parent
a5eae3d15f
commit
ff7560b6ff
1 changed files with 8 additions and 0 deletions
|
@ -4364,6 +4364,14 @@ This function could be useful in `message-setup-hook'."
|
|||
(dolist (hdr '("To" "Cc" "Bcc"))
|
||||
(let ((addr (message-fetch-field hdr)))
|
||||
(when (stringp addr)
|
||||
;; First check for syntactically invalid addresses.
|
||||
(dolist (address (mail-header-parse-addresses addr t))
|
||||
(unless (mail-header-parse-addresses address)
|
||||
(unless (y-or-n-p
|
||||
(format "Email address %s looks invalid; send anyway?"
|
||||
address))
|
||||
(user-error "Invalid address %s" address))))
|
||||
;; Then check for likely-bogus addresses.
|
||||
(dolist (bog (message-bogus-recipient-p addr))
|
||||
(and bog
|
||||
(not (y-or-n-p
|
||||
|
|
Loading…
Add table
Reference in a new issue