Function: mh-mh-to-mime

mh-mh-to-mime is an autoloaded, interactive and byte-compiled function defined in mh-mime.el.gz.

Signature

(mh-mh-to-mime &optional EXTRA-ARGS)

Documentation

Compose MIME message from MH-style directives.

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.

If you wish to pass additional arguments to "mhbuild" ("mhn") to affect how it builds your message, use the option mh-mh-to-mime-args. For example, you can build a consistency check into the message by setting mh-mh-to-mime-args to
"-check". The recipient of your message can then run "mhbuild
-check" on the message--"mhbuild" ("mhn") will complain if
the message has been corrupted on the way. This command only consults this option when given a prefix argument EXTRA-ARGS.

The hook mh-mh-to-mime-hook is called after the message has been formatted.

The effects of this command can be undone by running M-x mh-mh-to-mime-undo (mh-mh-to-mime-undo).

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/mh-e/mh-mime.el.gz
;;;###mh-autoload
(defun mh-mh-to-mime (&optional extra-args)
  "Compose MIME message from MH-style directives.

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.

If you wish to pass additional arguments to \"mhbuild\" (\"mhn\")
to affect how it builds your message, use the option
`mh-mh-to-mime-args'. For example, you can build a consistency
check into the message by setting `mh-mh-to-mime-args' to
\"-check\". The recipient of your message can then run \"mhbuild
-check\" on the message--\"mhbuild\" (\"mhn\") will complain if
the message has been corrupted on the way. This command only
consults this option when given a prefix argument EXTRA-ARGS.

The hook `mh-mh-to-mime-hook' is called after the message has been
formatted.

The effects of this command can be undone by running
\\[mh-mh-to-mime-undo]."
  (interactive "*P")
  (mh-mh-quote-unescaped-sharp)
  (save-buffer)
  (message "Running %s..." (if (mh-variant-p 'nmh) "mhbuild" "mhn"))
  (cond
   ((mh-variant-p 'nmh)
    (mh-exec-cmd-error nil
                       "mhbuild"
                       (if extra-args mh-mh-to-mime-args)
                       buffer-file-name))
   (t
    (mh-exec-cmd-error (format "mhdraft=%s" buffer-file-name)
                       "mhn"
                       (if extra-args mh-mh-to-mime-args)
                       buffer-file-name)))
  (revert-buffer t t t)
  (message "Running %s...done" (if (mh-variant-p 'nmh) "mhbuild" "mhn"))
  (run-hooks 'mh-mh-to-mime-hook))