;;; @ MIME entity
;;;
-(defun mime-entity-fetch-field (entity field-name)
+(defun mime-fetch-field (field-name &optional entity)
(or (symbolp field-name)
(setq field-name (intern (capitalize (capitalize field-name)))))
+ (or entity
+ (setq entity mime-message-structure))
(let* ((header (mime-entity-original-header entity))
(field-body (cdr (assq field-name header))))
(or field-body
)
field-body))))
-(defun mime-entity-read-field (entity field-name)
+(defun mime-read-field (field-name &optional entity)
(or (symbolp field-name)
(setq field-name (capitalize (capitalize field-name))))
+ (or entity
+ (setq entity mime-message-structure))
(cond ((eq field-name 'Content-Type)
(mime-entity-content-type entity)
)
(let* ((header (mime-entity-parsed-header entity))
(field (cdr (assq field-name header))))
(or field
- (let ((field-body (mime-entity-fetch-field entity field-name)))
+ (let ((field-body (mime-fetch-field field-name entity)))
(when field-body
(cond ((memq field-name '(From Resent-From
To Resent-To