(require 'rfc2047)
+(autoload 'mml-to-mime "mml"
+ "Translate the current buffer from MML to MIME.")
+
(defgroup sendmail nil
"Mail sending commands for Emacs."
:prefix "mail-"
:options '(footnote-mode))
(defvar mail-mode-abbrev-table text-mode-abbrev-table)
+(defvar mail-encode-mml)
;;;###autoload
(define-derived-mode mail-mode text-mode "Mail"
"Major mode for editing mail to be sent.
(make-local-variable 'mail-reply-action)
(make-local-variable 'mail-send-actions)
(make-local-variable 'mail-return-action)
+ (make-local-variable 'mail-encode-mml)
+ (setq mail-encode-mml nil)
(setq buffer-offer-save t)
(make-local-variable 'font-lock-defaults)
(setq font-lock-defaults '(mail-font-lock-keywords t t))
(error "Invalid header line (maybe a continuation line lacks initial whitespace)"))
(forward-line 1)))
(goto-char opoint)
+ (when mail-encode-mml
+ (mml-to-mime)
+ (setq mail-encode-mml nil))
(run-hooks 'mail-send-hook)
(message "Sending...")
(funcall send-mail-function)