summaryrefslogtreecommitdiff
path: root/lisp/mail/mail-parse.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/mail/mail-parse.el')
-rw-r--r--lisp/mail/mail-parse.el11
1 files changed, 6 insertions, 5 deletions
diff --git a/lisp/mail/mail-parse.el b/lisp/mail/mail-parse.el
index 23894e59b77..d28b8b58438 100644
--- a/lisp/mail/mail-parse.el
+++ b/lisp/mail/mail-parse.el
@@ -76,7 +76,8 @@
The return value is a list with mail/name pairs."
(delq nil
(mapcar (lambda (elem)
- (or (mail-header-parse-address elem)
+ (or (ignore-errors
+ (mail-header-parse-address elem))
(mail-header-parse-address-lax elem)))
(mail-header-parse-addresses string t))))
@@ -84,10 +85,10 @@ The return value is a list with mail/name pairs."
"Parse STRING as a mail address.
Returns a mail/name pair.
-This function will first try to parse STRING as a
-standards-compliant address string, and if that fails, try to use
-heuristics to determine the email address and the name in the
-string."
+This function uses heuristics to determine the email address and
+the name in the string. If you have an RFC822(bis)
+standards-compliant STRING, use `mail-header-parse-address'
+instead."
(with-temp-buffer
(insert (string-clean-whitespace string))
;; Find the bit with the @ and guess that that's the mail.