# MH-MIME(7mh) - man - phpMan

[MH-MIME(7mh)](https://www.chedong.com/phpMan.php/man/MH-MIME/7mh/markdown)                                                                            [MH-MIME(7mh)](https://www.chedong.com/phpMan.php/man/MH-MIME/7mh/markdown)



## NAME
       mh-mime - overview of nmh MIME message composition and display

## DESCRIPTION
       The  acronym  MIME  stands  for Multipurpose Internet Mail Extensions, the format of Internet
       messages used to send multi-media content.  The **nmh** command suite has support for the display
       and  composition  of  MIME  messages, but currently MIME support is not completely integrated
       into all tools.  This document provides an overview as to which tools  support  MIME  message
       display, storage, and composition.

### Local Character Set Conversion
       All  of  the  **nmh**  commands  convert non-native character sets to the local character set, as
       specified by the operating system locale settings.  See [_locale_(1)](https://www.chedong.com/phpMan.php/man/locale/1/markdown) for more details on the en‐
       vironment  variables used to set the local character set.  Character set conversion will only
       take place if **nmh** was built with [_iconv_(3)](https://www.chedong.com/phpMan.php/man/iconv/3/markdown) support.  See the [_mhparam_(1)](https://www.chedong.com/phpMan.php/man/mhparam/1/markdown) man page  for  how  to
       determine whether your **nmh** installation includes [_iconv_(3)](https://www.chedong.com/phpMan.php/man/iconv/3/markdown) support.

       Depending on the source and target character set, it may not be possible to convert all char‐
       acters to the local character set.  In this case a substitution character will  be  used  for
       the characters that cannot be converted.

### Message Display
       The  default  format  used by [_scan_(1)](https://www.chedong.com/phpMan.php/man/scan/1/markdown) will automatically decode MIME-encoded headers.  If you
       have a custom **scan** format, see the examples provided with the **nmh** distribution (found in  the
       “_/etc/nmh_”  directory) and [_mh-format_(5)](https://www.chedong.com/phpMan.php/man/mh-format/5/markdown) for details on how to make sure your MIME headers are
       properly decoded.

       By default, if **show** detects that it is reading a MIME message it will invoke [_mhshow_(1)](https://www.chedong.com/phpMan.php/man/mhshow/1/markdown).   The
       default  behavior of **mhshow** is to only display text parts that are not marked as attachments.
       See [_mhshow_(1)](https://www.chedong.com/phpMan.php/man/mhshow/1/markdown) for details on how to control what **mhshow** will display.

### Message Interrogation and Storage
       The [_mhlist_(1)](https://www.chedong.com/phpMan.php/man/mhlist/1/markdown) command will display a listing of the MIME parts contained  within  a  message.
       That information can be used in conjunction with the **mhstore** command to save individual parts
       or content types of a message.  See [_mhlist_(1)](https://www.chedong.com/phpMan.php/man/mhlist/1/markdown) and [_mhstore_(1)](https://www.chedong.com/phpMan.php/man/mhstore/1/markdown) for more details  on  how  these
       commands work.

### Message Composition and Reply
       All  messages  sent  by  [_send_(1)](https://www.chedong.com/phpMan.php/man/send/1/markdown)  will  automatically be processed by [_mhbuild_(1)](https://www.chedong.com/phpMan.php/man/mhbuild/1/markdown) before being
       passed to [_post_(1)](https://www.chedong.com/phpMan.php/man/post/1/markdown) for message submission.  **mhbuild** will use the locale settings to mark  text
       content  with the appropriate character set and apply any necessary encoding.  If you wish to
       include text in your message using a character set that does not match your locale, you  will
       need  to specify the character set using an **mhbuild** directive; see [_mhbuild_(1)](https://www.chedong.com/phpMan.php/man/mhbuild/1/markdown) for more infor‐
       mation.

       For attaching files or composing other non-text content, there are two  options:  the  attach
       system and **mhbuild** directives.

       The  attach system is best suited for content where one or more files are being attached to a
       message.  You can use the attach system by either using the **attach** command at the “What now?”
       prompt,  or  by inserting an “Attach:” header in the message draft containing the name of the
       file you wish to attach to the message (note that all the **attach** command  does  is  place  an
       “Attach:”  header  in the message draft).  **mhbuild** will then automatically include the speci‐
       fied file(s) in the outgoing message.  See [_send_(1)](https://www.chedong.com/phpMan.php/man/send/1/markdown) for details on how **mhbuild** determines  the
       proper content type of attached files.

       The  other method of composing MIME messages is to use **mhbuild** directives.  This allows exact
       control over the contents and format of the MIME message, but has a more complicated  syntax.
       [_mhbuild_(1)](https://www.chedong.com/phpMan.php/man/mhbuild/1/markdown)  contains details on the directive syntax and examples of directives for different
       media types.  It is important to note that when using **mhbuild** directives the  user  must  run
       **mhbuild**  outside  of  **send**  to have it process directives; when being run by **send**, **mhbuild** is
       configured to not process directives so normal user text is not  mistaken  for  a  directive.
       When  using  directives  a  user typically uses the **mime** command at the “What now?” prompt to
       process them.

       When replying to messages using [_repl_(1)](https://www.chedong.com/phpMan.php/man/repl/1/markdown) the traditional MH method of including  the  original
       text  in  the  reply  does  not  interoperate with MIME messages.  The **-convertargs** switch to
       [_repl_(1)](https://www.chedong.com/phpMan.php/man/repl/1/markdown)   provides   one   solution.     Another    solution:     the    contrib    directory
       (_/usr/share/doc/nmh/contrib_)  contains  a  Perl  program called **replyfilter** which will decode
       text parts and present them in an appropriate manner to be included in a message reply.   See
       the  comments at the top of **replyfilter** for instructions on how to configure **nmh** to work with
       it.

### Message Rewrite
       The [_mhfixmsg_(1)](https://www.chedong.com/phpMan.php/man/mhfixmsg/1/markdown) command can apply various transformations to MIME messages, including  decod‐
       ing  of  text  parts, converting the character set of text parts, and insertion of text/plain
       parts to correspond to text parts of other subtypes.  **mhfixmsg** can  also  repair  defects  in
       MIME messages, such as mismatched top-level boundary indicators and invalid Content-Transfer-
       Encoding values.

## SEE ALSO
       [_comp_(1)](https://www.chedong.com/phpMan.php/man/comp/1/markdown), [_iconv_(3)](https://www.chedong.com/phpMan.php/man/iconv/3/markdown), [_mh-format_(5)](https://www.chedong.com/phpMan.php/man/mh-format/5/markdown) [_mhbuild_(1)](https://www.chedong.com/phpMan.php/man/mhbuild/1/markdown), [_mhfixmsg_(1)](https://www.chedong.com/phpMan.php/man/mhfixmsg/1/markdown), [_mhparam_(1)](https://www.chedong.com/phpMan.php/man/mhparam/1/markdown), [_nmh_(7)](https://www.chedong.com/phpMan.php/man/nmh/7/markdown),  [_repl_(1)](https://www.chedong.com/phpMan.php/man/repl/1/markdown),  _what__‐
       [_now_(1)](https://www.chedong.com/phpMan.php/man/now/1/markdown),
       _/usr/share/doc/nmh/contrib/replyfilter_,
       _/usr/share/doc/nmh/contrib/replaliases_

## BUGS
       MIME support should be more integrated into all of the **nmh** tools than it currently is.



nmh-1.7.1                                    2014-12-15                                 [MH-MIME(7mh)](https://www.chedong.com/phpMan.php/man/MH-MIME/7mh/markdown)
