;;; -*-Scheme-*-
;;;
-;;; $Id: imail-top.scm,v 1.151 2000/06/14 02:15:42 cph Exp $
+;;; $Id: imail-top.scm,v 1.152 2000/06/14 02:24:50 cph Exp $
;;;
;;; Copyright (c) 1999-2000 Massachusetts Institute of Technology
;;;
Otherwise, only the header fields normally shown by IMAIL are sent."
#f
boolean?)
+
+(define-variable imail-forward-using-mime
+ "If true, forwarded email messages are sent as MIME attachments.
+Otherwise, they are inserted into the message body."
+ #t
+ boolean?)
\f
(define-command imail
"Read and edit incoming mail.
imail-dont-reply-to-names
imail-expunge-confirmation
imail-forward-all-headers
+ imail-forward-using-mime
imail-ignored-headers
imail-kept-headers
imail-message-filter
"]")))
#f
(lambda (mail-buffer)
- (add-buffer-mime-attachment!
- mail-buffer
- 'MESSAGE 'RFC822 '() '(INLINE)
- (map header-field->mail-header
- (let ((headers (message-header-fields message)))
- (if (ref-variable imail-forward-all-headers mail-buffer)
- headers
- (maybe-reformat-headers headers mail-buffer))))
- (message-body message))
+ (let ((raw? (ref-variable imail-forward-all-headers mail-buffer)))
+ (if (ref-variable imail-forward-using-mime mail-buffer)
+ (add-buffer-mime-attachment!
+ mail-buffer
+ 'MESSAGE 'RFC822 '() '(INLINE)
+ (map header-field->mail-header
+ (let ((headers (message-header-fields message)))
+ (if raw?
+ headers
+ (maybe-reformat-headers headers mail-buffer))))
+ (message-body message))
+ (let ((mark (mark-left-inserting-copy (buffer-end mail-buffer))))
+ (with-buffer-point-preserved mail-buffer
+ (lambda ()
+ (insert-header-fields message raw? mark)
+ (insert-string (message-body message) mark)))
+ (mark-temporary! mark))))
(if (window-has-no-neighbors? (current-window))
(select-buffer mail-buffer)
(select-buffer-other-window mail-buffer))
;;; -*-Scheme-*-
;;;
-;;; $Id: imail.pkg,v 1.55 2000/06/12 04:04:46 cph Exp $
+;;; $Id: imail.pkg,v 1.56 2000/06/14 02:24:54 cph Exp $
;;;
;;; Copyright (c) 2000 Massachusetts Institute of Technology
;;;
edwin-variable$imail-dont-reply-to-names
edwin-variable$imail-expunge-confirmation
edwin-variable$imail-forward-all-headers
+ edwin-variable$imail-forward-using-mime
edwin-variable$imail-ignored-headers
edwin-variable$imail-kept-headers
edwin-variable$imail-message-filter
IMAIL To-Do List
-$Id: todo.txt,v 1.78 2000/06/14 02:16:23 cph Exp $
+$Id: todo.txt,v 1.79 2000/06/14 02:25:04 cph Exp $
Bug fixes
---------
original message using MIME, rather than the current copy-and-indent
mechanism.
-* Should MIME encapsulation of forwarded messages be optional?
-
* Command to expand attachment inline. Sometimes attachments aren't
big binary things but small text things that are easier to view
inline.