Function: mh-mml-to-mime
mh-mml-to-mime is an autoloaded, interactive and byte-compiled
function defined in mh-mime.el.gz.
Signature
(mh-mml-to-mime)
Documentation
Compose MIME message from MML tags.
Typically, you send a message with attachments just like any other message. However, you may take a sneak preview of the MIME encoding if you wish by running this command.
This action can be undone by running C-x u (undo).
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/mh-e/mh-mime.el.gz
;;;###mh-autoload
(defun mh-mml-to-mime ()
"Compose MIME message from MML tags.
Typically, you send a message with attachments just like any
other message. However, you may take a sneak preview of the MIME
encoding if you wish by running this command.
This action can be undone by running \\[undo]."
(interactive)
(require 'message)
(when mh-pgp-support-flag
;; PGP requires actual e-mail addresses, not aliases.
;; Parse the recipients and sender from the message.
(message-options-set-recipient)
;; Do an alias lookup on sender (if From field is present).
(when (message-options-get 'message-sender)
(message-options-set 'message-sender
(mail-strip-quoted-names
(mh-alias-expand
(message-options-get 'message-sender)))))
;; Do an alias lookup on recipients
(message-options-set 'message-recipients
(mapconcat
(lambda (ali)
(mail-strip-quoted-names (mh-alias-expand ali)))
(split-string (message-options-get 'message-recipients) "[, ]+")
", ")))
(let ((saved-text (buffer-string))
(buffer (current-buffer))
(modified-flag (buffer-modified-p)))
(condition-case err (mml-to-mime)
(error
(with-current-buffer buffer
(delete-region (point-min) (point-max))
(insert saved-text)
(set-buffer-modified-p modified-flag))
(error (error-message-string err))))))