Function: textsec-email-address-suspicious-p
textsec-email-address-suspicious-p is a byte-compiled function defined
in textsec.el.gz.
Signature
(textsec-email-address-suspicious-p ADDRESS)
Documentation
Say whether email ADDRESS looks suspicious.
If it isn't, return nil. If it is, return a string explaining the potential problem.
ADDRESS should be a string that specifies an email address.
An email address is considered suspicious if either of its two
parts -- the local address name or the domain -- are found to be
suspicious by, respectively, textsec-local-address-suspicious-p
and textsec-domain-suspicious-p.
Source Code
;; Defined in /usr/src/emacs/lisp/international/textsec.el.gz
(defun textsec-email-address-suspicious-p (address)
"Say whether email ADDRESS looks suspicious.
If it isn't, return nil. If it is, return a string explaining the
potential problem.
ADDRESS should be a string that specifies an email address.
An email address is considered suspicious if either of its two
parts -- the local address name or the domain -- are found to be
suspicious by, respectively, `textsec-local-address-suspicious-p'
and `textsec-domain-suspicious-p'."
(pcase-let ((`(,local ,domain) (split-string address "@")))
(or
(if domain (textsec-domain-suspicious-p domain))
(textsec-local-address-suspicious-p local))))