The Mutt E-Mail Client : Mutt's MIME Support : MIME Autoview
Previous: Example mailcap files
Next: MIME Multipart/Alternative

## 5.4. MIME Autoview

In addition to explicitly telling Mutt to view an attachment with the MIME viewer defined in the mailcap file, Mutt has support for automatically viewing MIME attachments while in the pager.

To work, you must define a viewer in the mailcap file which uses the `copiousoutput` option to denote that it is non-interactive. Usually, you also use the entry to convert the attachment to a text representation which you can view in the pager.

You then use the `auto_view` muttrc command to list the content-types that you wish to view automatically.

For instance, if you set auto_view to:

> `

>     auto_view text/html text/enriched application/x-gunzip application/postscript image/gif application/x-tar-gz

> `

Mutt could use the following mailcap entries to automatically view attachments of these types.

> `

>     text/html;      lynx -dump %s; copiousoutput; nametemplate=%s.html
>     text/enriched;  enriched.sh  ; copiousoutput
>     image/*;        anytopnm %s | pnmscale -xsize 80 -ysize 50 | ppmtopgm | pgmtopbm | pbmtoascii ; copiousoutput
>     application/x-gunzip;   gzcat; copiousoutput
>     application/x-tar-gz; gunzip -c %s | tar -tf - ; copiousoutput
>     application/postscript; ps2ascii %s; copiousoutput

> `

``unauto_view'' can be used to remove previous entries from the autoview list. This can be used with message-hook to autoview messages based on size, etc. ``unauto_view *'' will remove all previous entries.

The Mutt E-Mail Client : Mutt's MIME Support : MIME Autoview
Previous: Example mailcap files
Next: MIME Multipart/Alternative