(set-buffer mime-preview-buffer))
(if bbdb-use-pop-up
(mime-bbdb/pop-up-bbdb-buffer offer-to-create)
- (let* ((from (std11-field-body "From"))
- (addr (if from
- (car (cdr (mail-extract-address-components from))))))
- (if (or (null from)
- (null addr)
- (string-match (bbdb-user-mail-names) addr))
- (setq from (or (std11-field-body "To") from))
+ (let* ((message (get-text-property (point-min) 'mime-view-entity))
+ (from (mime-entity-fetch-field message 'From))
+ addr)
+ (if (or (null from)
+ (null
+ (setq addr (car (mime-entity-read-field message 'From))))
+ (string-match (bbdb-user-mail-names)
+ (std11-address-string addr)))
+ (setq from (or (mime-entity-fetch-field message 'To)
+ from))
)
(if from
(bbdb-annotate-message-sender
- from t
+ (eword-decode-structured-field-body from) t
(or (bbdb-invoke-hook-for-value mime-bbdb/auto-create-p)
offer-to-create)
offer-to-create))