+(defun bbdb-wl-get-addresses-2 (&optional only-first-address)
+ "Return real name and email address of sender respectively recipients.
+If an address matches `bbdb-user-mail-names' it will be ignored.
+The headers to search can be configured by `bbdb-get-addresses-headers'.
+For BBDB 2.34 or later."
+ (save-excursion
+ (save-restriction
+ (std11-narrow-to-header)
+ (let ((headers bbdb-get-addresses-headers)
+ (uninteresting-senders bbdb-user-mail-names)
+ addrlist header structures structure fn ad
+ header-type header-fields header-content)
+ (while headers
+ (setq header-type (caar headers)
+ header-fields (cdar headers))
+ (while header-fields
+ (setq header-content (std11-fetch-field (car header-fields)))
+ (when header-content
+ (setq structures (std11-parse-addresses-string
+ (std11-unfold-string header-content)))
+ (while (and (setq structure (car structures))
+ (eq (car structure) 'mailbox))
+ (setq fn (funcall bbdb-wl-canonicalize-full-name-function
+ (std11-full-name-string structure))
+ fn (and fn
+ (with-temp-buffer ; to keep raw buffer unibyte.
+ (elmo-set-buffer-multibyte
+ default-enable-multibyte-characters)
+ (eword-decode-string
+ (decode-mime-charset-string
+ fn wl-mime-charset))))
+ ad (std11-address-string structure))
+ ;; ignore uninteresting addresses, this is kinda gross!
+ (when (or (not (stringp uninteresting-senders))
+ (not
+ (or
+ (and fn
+ (string-match uninteresting-senders fn))
+ (and ad
+ (string-match uninteresting-senders ad)))))
+ (add-to-list 'addrlist (list header-type
+ (car header-fields)
+ (list fn ad))))
+ (if (and only-first-address addrlist)
+ (setq structures nil headers nil)
+ (setq structures (cdr structures)))))
+ (setq header-fields (cdr header-fields)))
+ (setq headers (cdr headers)))
+ (nreverse addrlist)))))
+
+(defun bbdb-wl-get-addresses (&optional only-first-address)
+ "Return real name and email address of sender respectively recipients.
+If an address matches `bbdb-user-mail-names' it will be ignored.
+The headers to search can be configured by `bbdb-get-addresses-headers'."
+ (if (string< bbdb-version "2.34")
+ (bbdb-wl-get-addresses-1)
+ (bbdb-wl-get-addresses-2)))
+